-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
High
-
Component/s: Page - Editor - Migration or Conversion to Fabric
-
None
-
2
-
Severity 3 - Minor
-
Warranty
Issue Summary
Whenever we try to edit or copy the page, the following error message is presented when loading it in edit mode:
"An error occurred while loading the editor. Your changes have been saved. Refresh the page and try again."
When trying to close the page without saving, another popup error is presented:
"Title is required
Add a title before publishing."
Error 1 — Rendering failure:
com.atlassian.confluence.content.render.xhtml.XhtmlException: RuntimeException occurred while performing an XHTML storage transformation (Expected ac:structured-macro end element but got: <ac:adf-fragment-mark>)
Source: com.atlassian.confluence.content.render.xhtml.DefaultRenderer.renderWithoutMetrics(DefaultRenderer.java:207)
Error 2 — Collab service reset failure :
Failure to perform collab service reset called via Confluence API TransformationException: Error converting storage to ADF, contentID: ContentId{id=xxxxxx}
Source: CollabContentController.lambda$resetCollabService$1(CollabContentController.java:169)
Root Cause
The page's storage format contains <ac:adf-fragment-mark> elements placed as direct children of <ac:structured-macro> elements — a position where the XML parser does not expect them. The parser encounters the fragment mark where it expects either </ac:structured-macro> (end tag), <ac:parameter>, or <ac:rich-text-body>.
Invalid Pattern Found in Storage
<ac:structured-macro ac:name="table-excerpt-include" ac:schema-version="1" ...> <ac:parameter ac:name="name">xxxxx</ac:parameter> <ac:parameter ac:name="pageId">xxx</ac:parameter> <!-- ... other parameters ... --> <ac:adf-fragment-mark> <!-- ❌ INVALID POSITION --> <ac:adf-fragment-mark-detail name="xxxx" local-id="e00e8e9a-..." /> </ac:adf-fragment-mark> </ac:structured-macro>
Steps to Reproduce
- Open a page containing multiple Marketplace macros that use ac:adf-fragment-mark (e.g., Table Processor / Table Excerpt Include from the "Table Filter, Charts & Spreadsheets" app)
- Edit the page in the Fabric editor
- Attempt to publish
Expected Results
Page published without errors.
Actual Results
- Page fails with the XhtmlException above;
- Har file shows the request PUT /wiki/rest/collab/1.0/content/xxxxx/reset?behind=COLLAB] failing with Status Code 500 Internal Server Error and the response:
{ "error": "Expected ac:structured-macro end element but got: <ac:adf-fragment-mark>"}
- Log files shows the exception:
com.atlassian.confluence.content.render.xhtml.XhtmlException: RuntimeException occurred while performing an XHTML storage transformation (Expected ac:structured-macro end element but got: <ac:adf-fragment-mark>)
Workaround
Retrieve the page storage format via REST API, remove the invalid <ac:adf-fragment-mark>...</ac:adf-fragment-mark> elements from inside the affected macros, and PUT the corrected storage format back.