Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-25106

Chart Macro breaking due to Attribute "id" was already specified for element

    • Icon: Bug Bug
    • Resolution: Tracked Elsewhere
    • Icon: Low Low
    • None
    • 4.1.6, 4.3.2
    • None

      Chart macro will not render due to error

      Error rendering macro 'chart' : org.dom4j.DocumentException: Error on line 1 of document : Attribute "id" was already specified for element "h6". Nested exception: Attribute "id" was already specified for element "h6".
      

      Relates to https://jira.atlassian.com/browse/CONFDEV-4813
      where duplicate id fields break the XML parser.

      Cause

      This is caused by an included page in the Chart macro, where the included page contains headings. The headings are assigned an id tag when they are rendered, and the ids are consequently clashing.

      Workarounds

      1. Remove the headings from the included page
      2. Use the Excerpt Include macro instead of Include, as this strips formatting and as such will not throw the error.

            [CONFSERVER-25106] Chart Macro breaking due to Attribute "id" was already specified for element

            This is being tracked in the Chart Macro's issue tracker - https://studio.plugins.atlassian.com/browse/CHRT-149, so I am closing this issue as tracked elsewhere.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - This is being tracked in the Chart Macro's issue tracker - https://studio.plugins.atlassian.com/browse/CHRT-149 , so I am closing this issue as tracked elsewhere.

            Another customer has run into this issue so I am reopening the case.

            We encountered the same error as describe in CONF-25106. Our support team made a wiki page to display some usage statistics as charts. All charts are displayed fine except two.

            This is the error message that is shown on the page (twice):
            Error rendering macro 'chart' : org.dom4j.DocumentException: Error on line 1 of document : Attribute "id" was already specified for element "h3". Nested exception: Attribute "id" was already specified for element "h3".

            The error appeared after we upgraded Confluence from 3.5.17 to 4.3.2.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Another customer has run into this issue so I am reopening the case. We encountered the same error as describe in CONF-25106 . Our support team made a wiki page to display some usage statistics as charts. All charts are displayed fine except two. This is the error message that is shown on the page (twice): Error rendering macro 'chart' : org.dom4j.DocumentException: Error on line 1 of document : Attribute "id" was already specified for element "h3". Nested exception: Attribute "id" was already specified for element "h3". The error appeared after we upgraded Confluence from 3.5.17 to 4.3.2.

            There is not enough information to repdouce the problem. I tried by adding a h6 heading and the chart macro and it rendered fine. Please provide instructions on how to replicate this issue.

            Daniel (Inactive) added a comment - There is not enough information to repdouce the problem. I tried by adding a h6 heading and the chart macro and it rendered fine. Please provide instructions on how to replicate this issue.

              Unassigned Unassigned
              rgoodwin Ryan Goodwin (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: