-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Highest
-
Component/s: Page - Editor - Migration or Conversion to Fabric
-
23
-
Minor
-
40
Issue Summary
After migrating a page from the Legacy editor to the new Fabric editor, some pages cannot be modified if they contain unsupported macros. The unsupported content should remain encapsulated within the Legacy Content Macro on the new page. However, when attempting to save the page, the process fails with a connection error message. The update action to the page API results in a 500 error with the message:
com.atlassian.confluence.api.service.exceptions.ServiceException: java.lang.IllegalArgumentException: Unsupported node type found inside Task node: codeBlock.
"Failed to send Content Reset request to Collab Service!. Response body: Optional[{\"code\":\"PROSEMIRROR_SCHEMA_VALIDATION_ERROR\",\"message\":\"ADF document could not be converted to ProseMirror node\",\"meta\":\"Invalid collection of marks for node text: link,code\",\"status\":400}]"
{"error": "Failed to send Content Reset request to Collab Service!. Response body: Optional[\{\"code\":\"PROSEMIRROR_SCHEMA_VALIDATION_ERROR\",\"message\":\"ADF document could not be converted to ProseMirror node\",\"meta\":\"Invalid content for node nestedExpand: <paragraph(hardBreak), table(tableRow(tableHeader(\",\"status\":400}
"error": "Failed to send Content Reset request to Collab Service!. Response body: Optional[{\"code\":\"PROSEMIRROR_SCHEMA_VALIDATION_ERROR\",\"message\":\"ADF document could not be converted to ProseMirror node\",\"meta\":\"Invalid content for node nestedExpand: <paragraph(text_node), paragraph(text_node, hardBr\",\"status\":400}]"
"error": "Failed to send Content Reset request to Collab Service!. Response body: Optional[{\"code\":\"PROSEMIRROR_SCHEMA_VALIDATION_ERROR\",\"message\":\"ADF document could not be converted to ProseMirror node\",\"meta\":\"Invalid content for node tableCell: <paragraph(hardBreak), bodiedExtension(paragraph(t\",\"status\":400}]"
"error": "Failed to send Content Reset request to Collab Service!. Response body: Optional[{\"code\":\"PROSEMIRROR_SCHEMA_VALIDATION_ERROR\",\"message\":\"ADF document could not be converted to ProseMirror node\",\"meta\":\"Invalid content for node tableHeader: <indentation(heading(text_node))>\",\"status\":400}]"
Steps to Reproduce
Please take a look on the Loom video present in the comments
Here is the Legacy code (the issue is the codeblock inside the task element)
<ac:structured-macro ac:name="expand" ac:schema-version="1" ac:macro-id="d3ff9dbe-cb90-4476-bc67-04d75b869ee9"><ac:parameter ac:name="title">Expand Macro</ac:parameter><ac:rich-text-body><p class="auto-cursor-target"><br /></p><ac:structured-macro ac:name="panel" ac:schema-version="1" data-layout="default" ac:local-id="b4dec372-73b4-4154-ba49-542c553b1686" ac:macro-id="f945eefb0f13c2bf0d975541660e1ac315df04310d74462ea142fc6a9c9e0fd7"><ac:parameter ac:name="title">Test</ac:parameter><ac:parameter ac:name="borderStyle">solid</ac:parameter><ac:parameter ac:name="borderColor" /><ac:parameter ac:name="bgColor" /><ac:parameter ac:name="titleColor" /><ac:parameter ac:name="titleBGColor" /><ac:rich-text-body> <p /><ac:structured-macro ac:name="tip" ac:schema-version="1" ac:macro-id="ba708649-42d3-49db-a031-9c82bfb6eb22"><ac:rich-text-body> <p /></ac:rich-text-body></ac:structured-macro> <p /><ac:task-list><ac:task><ac:task-id>1</ac:task-id><ac:task-uuid>1</ac:task-uuid><ac:task-status>complete</ac:task-status></ac:task><ac:task><ac:task-id>2</ac:task-id><ac:task-uuid>2</ac:task-uuid><ac:task-status>complete</ac:task-status><ac:task-body><span class="placeholder-inline-tasks">A page name <ac:link><ri:page ri:content-title="Test PAge" /><ac:link-body>Installation Test Page</ac:link-body></ac:link><ac:structured-macro ac:name="code" ac:schema-version="1" ac:macro-id="59f8c7c0-f940-41b3-9cff-30b6a9e8202e"><ac:plain-text-body><![CDATA[-----BEGIN CERTIFICATE----------END CERTIFICATE-----]]></ac:plain-text-body></ac:structured-macro><br /></span></ac:task-body></ac:task><ac:task><ac:task-id>3</ac:task-id><ac:task-uuid>3</ac:task-uuid><ac:task-status>complete</ac:task-status></ac:task></ac:task-list></ac:rich-text-body></ac:structured-macro> </ac:task-list></ac:rich-text-body></ac:structured-macro>
- Migrate a page from the Legacy editor to the new Fabric editor.
- Ensure the page contains unsupported macros.
- Attempt to modify and save the page.
- Observe the error message and failure to save.
Expected Results
The unsupported content should remain within the Legacy macro, and the page should save successfully without errors.
Actual Results
The page fails to save, displaying a connection error message, and the API returns a 500 error due to unsupported node types.
Additional Request:
The customer requests a more informative error message in the editor to help them resolve the issue independently if needed.
Workaround
- Move Content Outside Legacy Macro:
-
- After converting the page, manually move the content from inside the Legacy editor macro to outside of it. This action will automatically remove unsupported nodes from the ADF (Atlassian Document Format) code.
- Remove Unsupported Nodes:
-
- Users can manually remove the unsupported node inside the task macro as indicated by the API error response. However, this action might be challenging for end users due to its complexity.