Office and Page Tree Macros in Confluence don't render data if the macro is formatted as bold

XMLWordPrintable

    • 20
    • Severity 3 - Minor
    • 3

      Issue Summary

      If the data is displayed via Page Tree macro and/or Office macro and the macro is formatted as bold, the macro won't render and the UI will show only a spinning wheel as if it were loading.

      Steps to Reproduce (using Office Macros)

      1. Edit a page with an attached Office file (xls/xlsx, doc/docx etc.)
      2. Insert an Office macro according to the attached document (for example, Office Excel Macro)
      3. Select the Excel Macro and select bold from the text format panel
        This will add <strong> tag around the macro
      4. Save the page

      Expected Results

      Office macro and Page Tree macros to render the data without issues.

      Actual Results

      Office macro can't render the attachments, and Page Tree macros can't render pages. A javascript error is thrown in the console log:

      Failed to run init function: Unexpected token < in JSON at position 0 ƒ (a){a("div.converter-macro-ajax-container").each(function(){var b=a(this),c=a.parseJSON(e.unescape(b.find(".converter-macro-parameters")[0].innerHTML));b.find(".converter-macro-file-name").text(c.nam… SyntaxError: Unexpected token < in JSON at position 0
          at JSON.parse (<anonymous>)
          at Function.E.parseJSON (batch.js?locale=en-GB:64)
          at Function.u.parseJSON (batch.js?locale=en-GB:285)
          at HTMLDivElement.<anonymous> (com.atlassian.confluence.extra.officeconnector:converter-macro-web-resources.js?locale=en-GB:5)
          at Function.each (batch.js?locale=en-GB:33)
          at u.fn.init.each (batch.js?locale=en-GB:29)
          at com.atlassian.confluence.extra.officeconnector:converter-macro-web-resources.js?locale=en-GB:5
          at batch.js?locale=en-GB:2336 SyntaxError: Unexpected token < in JSON at position 0
          at JSON.parse (<anonymous>)
          at Function.E.parseJSON (http://localhost:27112/c7112/s/f59f3d0ebd727f8430927257d7c31d35-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/4a7ee1c57b03455f1f74ef6c18d827e5/_/download/contextbatch/js/_super/batch.js?locale=en-GB:64:24782)
          at Function.u.parseJSON (http://localhost:27112/c7112/s/f59f3d0ebd727f8430927257d7c31d35-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/4a7ee1c57b03455f1f74ef6c18d827e5/_/download/contextbatch/js/_super/batch.js?locale=en-GB:285:3752)
          at HTMLDivElement.<anonymous> (http://localhost:27112/c7112/s/48fb512fdd6805e502f383535de1a411-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/11.4.3/_/download/batch/com.atlassian.confluence.extra.officeconnector:converter-macro-web-resources/com.atlassian.confluence.extra.officeconnector:converter-macro-web-resources.js?locale=en-GB:5:251)
          at Function.each (http://localhost:27112/c7112/s/f59f3d0ebd727f8430927257d7c31d35-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/4a7ee1c57b03455f1f74ef6c18d827e5/_/download/contextbatch/js/_super/batch.js?locale=en-GB:33:1304)
          at u.fn.init.each (http://localhost:27112/c7112/s/f59f3d0ebd727f8430927257d7c31d35-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/4a7ee1c57b03455f1f74ef6c18d827e5/_/download/contextbatch/js/_super/batch.js?locale=en-GB:29:998)
          at http://localhost:27112/c7112/s/48fb512fdd6805e502f383535de1a411-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/11.4.3/_/download/batch/com.atlassian.confluence.extra.officeconnector:converter-macro-web-resources/com.atlassian.confluence.extra.officeconnector:converter-macro-web-resources.js?locale=en-GB:5:217
          at http://localhost:27112/c7112/s/f59f3d0ebd727f8430927257d7c31d35-CDN/ce33zg/8701/9e64ae2e14b2a9149d6e55bc661fa83d63f4f188/4a7ee1c57b03455f1f74ef6c18d827e5/_/download/contextbatch/js/_super/batch.js?locale=en-GB:2336:488
      

      Workaround

      Removing the format (bold) fixes the issue.

      Information

      If there are multiple Excel Macros in the page, having any one of them bolded will cause the rest of the excel coming below it to encounter the issue as well

        1. officemacro-bug.jpg
          830 kB
          Basar Beykoz

            Assignee:
            Unassigned
            Reporter:
            Basar Beykoz (Inactive)
            Votes:
            20 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated: