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

Links to terminal pages are not stored properly as backlinks if the target page is created after the creation of the link

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.4.6, 11.10.10, 12.6.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      How to reproduce:

      • create a page Sandbox.A (or non terminal, it doesn't matter)
      • put the following content, in syntax XWiki 2.1
        [[Sandbox.B]]
        

        Note: the page Sandbox.B should not exist at this point, terminal or non terminal (Sandbox.B.WebHome

      • save page.
        • At this point, the link to B should appear displayed as a link to a non-existent page (with a question mark)
      • create page Sandbox.B as terminal (regardless of the method)
      • At this point, back on page A, the link to B appears functional (no longer broken). Clicking on it leads properly to page B.
      • go to page B and check the backlinks in the Information tab on page B

      Expected result:

      • page A appears in the list of backlinks (because there is a valid wiki link from the page A to page B)

      Actual result:

      • page A does not appear in the list of backlinks .

      If at this point page A is saved again, the backlinks will be set properly, because the target page B exists at the moment when the backlinks are updated.

      The cause of this is a consequence of XWIKI-12920 which makes the link to a non-existing page (Sandbox.B) be considered, by default, a link to a non-terminal page (Sandbox.B.WebHome) and thus saved in the backlinks table as Sandbox.B.WebHome upon creation of page A. When page Sandbox.B is finally created, the backlink is still Sandbox.B.WebHome, and doesn't get updated until page A is saved again.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mleduc Manuel Leduc
              Reporter:
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: