Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-19633

Renaming a document renames its content links twice

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • Awaiting Committer feedback

    Description

      Regression introduced in XWIKI-6732

      In AbstractCopyOrMoveJob#copyOrMove():

      ...1st time...
                  if (!this.atomicOperation(oldReference, newReference)) {
                      return false;
                  }
      
      ...2nd time...
                  this.observationManager.notify(afterEvent, this, this.getRequest());
      ...
      

      Notes:

      • atomicOperation calls XWiki#renameDocument()
      • and notify() will call RelativeLinkUpdateListener
      • Both do the same thing, i.e. refactor the document content links
      • Funnily if the old way (i.e. XWiki#renameDocument()) fails then the new way (i.e. RelativeLinkUpdateListener) isn't called

      We need to fix this to perform the refactoring only once.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: