Failed to parse XHTML content from Jira Macro Repair

XMLWordPrintable

    • 18
    • Severity 3 - Minor
    • 10

      Issue Summary

      When updating pages to fix broken macros (such as in Jira Macro Repair), user generated content needs to be parsed, updated, and then saved. Due to errors in the format of the XHTML, it's possible some pages cannot be parsed or saved, causing the content fixing to fail. 

       

      This is reproducible on Data Center: with suitable samples of XHTML

      Steps to Reproduce

      N/A

      Expected Results

      Pages should be able to be parsed and saved. 

      Actual Results

      Some pages fail when being parsed or being updated. 

       
      Troubleshooting

      When parsing fails, this log entry is logged from Jira Macro Repair: 

      Failed to parse content on page

      or

      Skipping page update due to parsing error.

       

      Use these steps to find these failed update entries

      • First run this Splunk query with the cloud ID of the tenant:

      "<cloudId>" `connie-prod` "ValidatorMessageRunner"

      • Use the trace ID from one of the logs (ext.traceId) with the following Splunk query:

       "<traceId>" `connie-prod` level=ERROR | stats count by message

      • There can be several traceId values to work through

       

      The error stack trace exception will show

      com.atlassian.confluence.content.render.xhtml.XhtmlException: RuntimeException occurred while performing an XHTML storage transformation (Cannot invoke "javax.xml.stream.events.Attribute.getValue()" because "macroNameAttribute" is null)
      ...
      Caused by: java.lang.NullPointerException: Cannot invoke "javax.xml.stream.events.Attribute.getValue()" because "macroNameAttribute" is null

       

      Workaround

      Please reach out to Atlassian Support.

            Assignee:
            Abhi Rajendra Zanzarukiya
            Reporter:
            Rananjay Pathania (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: