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

TOC macro can generate invalid links when there are included pages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • None
    • 8.2
    • Macro - Toc
    • N/A
    • N/A

    Description

      Duplicate header records are not handled correctly when content is pulled into a page with the include or display macros.

      Example:

      In Page1.WebHome:

      Page: Command Name One
      = Command Name One
      == Usage
      == Options
      == Command Details
      == Troubleshooting
      

      In Page2.WebHome:

      Page: Command Name Two
      = Command Name Two
      == Usage
      == Options
      == Command Details
      == Troubleshooting
      

      Aggregating Page.WebHome:

      {{toc/}}
      
      {{include reference="Main.page1.WebHome"/}}
      
      {{include reference="Main.page2.WebHome"/}}
      

      When you include or display them on one page and add a table of contents the macro renders correctly but the links for the duplicate heading level 2 records all link to the first occurrence.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              ptomblin Patrick Tomblin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: