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

Chart macro can fail due to XML parsing exceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 6.8.1, 6.9.0
    • 6.0.7, 6.4.0, 6.6.1
    • Macros - Chart

    Description

      Users can get "Error rendering macro 'chart' : image == null!" when including some content in a chart macro in addition to a table.

      More details can be found on: DEVHELP-804

      Example Scenario:

      1. Create a page where in have two of Bob Swift's macros one is table plus macro with
      sample table data and another one is future macro with some page links inside and also
      include some other macro inside future macro.

      Use Confluence Source Editor for the first page:

      <ac:structured-macro ac:name="tip" ac:schema-version="1" ac:macro-id="cff50121-be92-4284-b38c-3efceb30d279"><ac:rich-text-body>
      <p>Issues for active and public projects. Created in a given year.</p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="table-plus" ac:schema-version="1" ac:macro-id="ad0d1604-d403-4a48-b0ae-03a929d4dd98"><ac:parameter ac:name="rowStyles">,,background:#FFCC99</ac:parameter><ac:parameter ac:name="columnTypes">S,FF&quot;0,0&quot;,FF&quot;0,0&quot;,FF&quot;0,0&quot;,FF&quot;0,0&quot;,FF&quot;0,0&quot;,FF0%,FF0%,FF0%,FF0%</ac:parameter><ac:parameter ac:name="columnCalculations">,sum,sum,sum,sum,sum,avg,avg,avg,avg</ac:parameter><ac:parameter ac:name="autoNumber">true</ac:parameter><ac:parameter ac:name="enableSorting">true</ac:parameter><ac:parameter ac:name="autoTotal">true</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><ac:rich-text-body>
      <p><br /></p>
      <div class="table-wrap">
      <p><br /></p>
      <table class="wrapped"><colgroup> <col /> <col /> <col /> <col /> <col /> <col /> <col /> <col /> <col /> <col /> </colgroup>
      <tbody>
      <tr>
      <th>
      <p>Category</p></th>
      <th>
      <p>2013</p></th>
      <th>
      <p>2014</p></th>
      <th>
      <p>2015</p></th>
      <th>
      <p>2016</p></th>
      <th>
      <p>2017</p></th>
      <th>
      <p>14 ∆</p></th>
      <th>
      <p>15 ∆</p></th>
      <th>
      <p>16 ∆</p></th>
      <th>
      <p>17 ∆</p></th></tr>
      <tr>
      <td>
      <p>Bamboo</p></td>
      <td>
      <p>11</p></td>
      <td>
      <p>14</p></td>
      <td>
      <p>9</p></td>
      <td>
      <p>26</p></td>
      <td>
      <p>6</p></td>
      <td>
      <p>0.27</p></td>
      <td>
      <p>-0.36</p></td>
      <td>
      <p>1.89</p></td>
      <td>
      <p>-0.77</p></td></tr>
      <tr>
      <td>
      <p>CLI</p></td>
      <td>
      <p>320</p></td>
      <td>
      <p>381</p></td>
      <td>
      <p>630</p></td>
      <td>
      <p>818</p></td>
      <td>
      <p>692</p></td>
      <td>
      <p>0.19</p></td>
      <td>
      <p>0.65</p></td>
      <td>
      <p>0.30</p></td>
      <td>
      <p>-0.15</p></td></tr>
      <tr>
      <td>
      <p>Confluence</p></td>
      <td>
      <p>345</p></td>
      <td>
      <p>471</p></td>
      <td>
      <p>386</p></td>
      <td>
      <p>516</p></td>
      <td>
      <p>365</p></td>
      <td>
      <p>0.37</p></td>
      <td>
      <p>-0.18</p></td>
      <td>
      <p>0.34</p></td>
      <td>
      <p>-0.29</p></td></tr>
      <tr>
      <td>
      <p>JIRA</p></td>
      <td>
      <p>226</p></td>
      <td>
      <p>216</p></td>
      <td>
      <p>339</p></td>
      <td>
      <p>341</p></td>
      <td>
      <p>197</p></td>
      <td>
      <p>-0.04</p></td>
      <td>
      <p>0.57</p></td>
      <td>
      <p>0.01</p></td>
      <td>
      <p>-0.42</p></td></tr>
      <tr>
      <td>
      <p>Support</p></td>
      <td>
      <p>0</p></td>
      <td>
      <p>2</p></td>
      <td>
      <p>2</p></td>
      <td>
      <p>4</p></td>
      <td>
      <p>1</p></td>
      <td>
      <p><br /></p></td>
      <td>
      <p>0.00</p></td>
      <td>
      <p>1.00</p></td>
      <td>
      <p>-0.75</p></td></tr>
      <tr>
      <td>
      <p>Tools</p></td>
      <td>
      <p>20</p></td>
      <td>
      <p>32</p></td>
      <td>
      <p>19</p></td>
      <td>
      <p>40</p></td>
      <td>
      <p>37</p></td>
      <td>
      <p>0.60</p></td>
      <td>
      <p>-0.41</p></td>
      <td>
      <p>1.11</p></td>
      <td>
      <p>-0.08</p></td></tr></tbody></table>
      <p><br /></p></div>
      <p><br /></p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="future" ac:schema-version="1" ac:macro-id="8133c0c2-99b6-4357-b162-161d75e328b0"><ac:parameter ac:name="manual">true</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><ac:rich-text-body>
      <p><br /></p>
      <p>Testing CACHE-243</p>
      <p><a href="http://www.google.com">google</a></p>
      <p><strong>Any page link with in your instance.</strong></p>
      <p><ac:link><ri:page ri:content-title="CACHE-243" /></ac:link></p></ac:rich-text-body></ac:structured-macro>
      <p><br /></p>
      <p><br /></p>
      

      2. Create another page where in have Chart macro and inside that macro use include macro
      and use the above created page.
      3. When you load the page getting the below error for the chart macro page.
      Error rendering macro 'chart' : image == null!
      Please find the attached log which we are getting while getting the above error.

      Cache [Future Macro]: https://marketplace.atlassian.com/plugins/org.swift.confluence.cache/server/overview\\ Table Plus Macro : https://marketplace.atlassian.com/plugins/org.swift.confluence.table/cloud/overview\\

      Cause

      The underlying exception is an XML Parsing Exception. For example:

      Error rendering macro 'chart' : org.dom4j.DocumentException: Error on line 36 of document : The prefix "ac" for element "ac:link" is not bound. Nested exception: The prefix "ac" for element "ac:link" is not bound.

      In this case it is because the Future Macro is returning storage format inside the chart macro and it causes the Chart Macro's XML Parser to fail.

      This error could also happen with any other improperly-structure HTML or XML inside the chart macro.

      Attachments

        Issue Links

          Activity

            People

              alyakovlev Alex Yakovlev (Inactive)
              acalantog Anne Calantog
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: