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

Back links not updated if a page is renamed twice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.0 B6
    • 1.0 B5
    • {Unused} Wiki features
    • None
    • XWiki 1.0 B5, Tomcat 5.5.20, IBM JDK 1.5.0.4, Mysql 5.0, Gentoo 2006.1
    • rename document, renameDocument, backlinks

    Description

      It seems that the update backlinks functionality doesn't re-update backlinks if used twice in a row on the same document.

      I have a link to Main.a on Main.WebHome (for example), and I rename document Main.a to Main.b, the link on Main.WebHome is properly updated to point to Main.b.

      But, if I then further rename Main.b to Main.c, the link on Main.WebHome is not re-updated from Main.b to Main.c.

      However, if I edit and save Main.WebHome between the two renames, it does update the backlink the second time.

      I suspect it's because XWikiDocument.renameDocument does not save() the backlinkDocument after setContent is called (should be only onceper document, of course).

      I've created our own "rename document" gui page, which I can include if it would help, though I think it'd be overkill for this.

      Reproduction:
      Create Main.a, with a link from Main.WebHome (or wherever).

      Create Main.rename, add the following text, and save:
      $xwiki.getDocument("Main.a").renameDocument("Main.b")

      Go back to Main.WebHome and reload the document (don't save!). The link is updated to Main.b.

      Go back to Main.rename, change the text to the following, and save:
      $xwiki.getDocument("Main.b").renameDocument("Main.c")

      Go back to Main.WebHome and reload the document . The link is still Main.b.

      If you would have editied and saved Main.WebHome where it says "don't save!" above, it would have updated properly the second time.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            kliether Tom Kliethermes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: