Broken Macro after disable/enable View File Macro plugin

XMLWordPrintable

    • 27
    • Severity 2 - Major
    • 3

      Steps to reproduce

      1. Create a blank page;
      2. Drag and drop a file and check the storage format. It should look like this:
        <p>
          <ac:structured-macro ac:macro-id="3fa4b7be-699b-4675-83f9-15691f3470b5" ac:name="view-file" ac:schema-version="1">
            <ac:parameter ac:name="name">
              <ri:attachment ri:filename="pdf_sample.pdf"/>
            </ac:parameter>
            <ac:parameter ac:name="height">250</ac:parameter>
          </ac:structured-macro>
        </p>
        
      3. Go to Cog icon > Add-ons > All add-ons search for Confluence View File Macro and disable it;
      4. Back to the page, we see Unknown macro: 'view-file' instead of the dropped file (expected);
      5. Edit the page but do not touch the View File macro. Save the page
      6. Manage add-ons screen again, enable Confluence View File Macro;

      Expected behavior
      The files are displayed back properly.

      Actual Behavior
      Broken Macro message where there should be a file. The macro was corrupted during the page edit/save while the Confluence View File Macro plugin was disabled.
      In the storage format, we see missing parameters in the macro structure:

      <p>
        <ac:macro ac:name="view-file">
          <ac:parameter ac:name="name">pdf_sample.pdf</ac:parameter>
          <ac:parameter ac:name="height">250</ac:parameter>
        </ac:macro>
      </p>
      

      Workaround

      1. Restore the previous version of the page saved before the macro was disabled.
      2. Use the respective view macro depending on the file type (PDF, Word, Excel, PPT)

            Assignee:
            Unassigned
            Reporter:
            Lucas Machado (Inactive)
            Votes:
            43 Vote for this issue
            Watchers:
            35 Start watching this issue

              Created:
              Updated: