Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-472

Autolinks have the wrong HREF when the base reference is not the current page

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 8.4
    • Fix Version/s: None
    • Labels:
      None
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      To reproduce, create a page (e.g. Main.Page1.WebHome):

      {{context document="Main.Page2.WebHome"}}
      [[label1>>]]
      [[label2>>something]]
      {{/context}}
      

      You'll see that the first link points to the current page (incorrect), while the second one points to a children of Main.Page2.WebHome (correct).

      AFAICS this is because in https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/link/DocumentXHTMLLinkTypeRenderer.java#L143 we always generate an HREF of "#", even if the base reference is different from the current reference.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vmassol Vincent Massol
                Reporter:
                vmassol Vincent Massol
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: