Uploaded image for project: 'Confluence Server and Data Center'
  1. Confluence Server and Data Center
  2. CONFSERVER-53138

TOC macro with Content by label will cause error rendering macro "toc" in preview.

    XMLWordPrintable

Details

    Description

      Summary

      Adding the TOC macro to the page where Content by Label macro is present in preview only will render error message on the position of TOC:
      "Error rendering macro 'toc' : [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Duplicate attribute 'and'. at [row,col

      {unknown-source}]: [1,1267]

      Steps to Reproduce

      1. Create with Content by Label macro
      2. Add TOC macro in front of Content by Lable macro. Or use this Storage format:
        <p><ac:structured-macro ac:name="toc" ac:schema-version="1" ac:macro-id="09909e98-85a4-426e-8e66-884c0f83b094" /></p>
        <p><ac:structured-macro ac:name="contentbylabel" ac:schema-version="3" ac:macro-id="af2f44db-4ecd-4b1d-90cb-c7b53e1a06a9"><ac:parameter ac:name="showLabels">false</ac:parameter><ac:parameter ac:name="max">5</ac:parameter><ac:parameter ac:name="spaces">ITWIKI</ac:parameter><ac:parameter ac:name="showSpace">false</ac:parameter><ac:parameter ac:name="sort">modified</ac:parameter><ac:parameter ac:name="reverse">true</ac:parameter><ac:parameter ac:name="type">page</ac:parameter><ac:parameter ac:name="cql">label = &quot;page&quot; and type = &quot;page&quot; and space = currentSpace()</ac:parameter><ac:parameter ac:name="labels">NetApp Neustarten Reboot Administration</ac:parameter></ac:structured-macro></p>
      3. Click "preview"

      Expected Results

      1. See TOC macro render nothing as there is no content for it.

      Actual Results

      1. Observe error message in place of TOC macro 
        "Error rendering macro 'toc' : [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Duplicate attribute 'and'. at [row,col
        {unknown-source}

      ]: [1,1267]"

      Workaround

      Place TOC macro after Content by label macro. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            gpaunovic g
            Votes:
            11 Vote for this issue
            Watchers:
            17 Start watching this issue

            Dates

              Created:
              Updated: