Inline comments fail with HTTP 412 on pages containing unknown or disabled macros converted to legacy <ac:macro> format

XMLWordPrintable

    • 2
    • Severity 3 - Minor
    • 11

      Issue Summary

      Adding inline comments fails with HTTP 412 on pages containing unknown or disabled macros that have been serialized/downgraded from <ac:structured-macro> to legacy <ac:macro> format upon saving.

      Steps to Reproduce

      1. Create and edit a Confluence page.
      2. Add plain text paragraphs with a custom or third-party structured macro in between, using storage format such as:
        <p>word</p> <p>  <ac:structured-macro ac:name="nonexistent-or-disabled-macro">  <ac:parameter ac:name="anyparameter">value</ac:parameter>  </ac:structured-macro> </p> <p>word</p> 
      3. Save/publish the page while the corresponding macro plugin is disabled, uninstalled, or unknown to Confluence.
        Upon saving, Confluence transforms_ <ac:structured-macro> into <ac:macro> due to missing runtime type metadata
      4. In page view mode, highlight/select the plain text (e.g., the word word in the paragraph after the macro) and attempt to add and save an inline comment.

      Expected Results

      Users should be able to create and save inline comments on the plain text surrounding the unknown macro.

      Actual Results

      The inline comment fails to save, and the following error appears in the UI:

      "We can't add your inline comment; the section you highlighted may contain a macro or user mention. Try highlighting plain text."

      The browser console / network tab records a 412 Precondition Failed error on POST /rest/inlinecomments/1.0/comments.

      Workaround

      Temporary operational workaround: Re-enable or reinstall the missing/disabled macro plugin, or manually edit the page storage format to remove legacy <ac:macro> references to disabled/uninstalled macros

              Assignee:
              Tom Smallridge
              Reporter:
              Shivangi Nayak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: