Problem Statement
In the content version History Compare, a Block Editor (StoryBlock) field renders incorrectly when the new Block Editor is active (FEATURE_FLAG_NEW_BLOCK_EDITOR on, now the default after #36254). With the legacy editor the same comparison renders correctly.
Symptom observed:
- In the field-by-field view the Block Editor field can render empty / as
null.
Impact: version comparison is effectively unusable for Block Editor fields under the new editor. Because #36254 flipped the new editor on by default, this now affects all instances. Front-end only; the stored content is unaffected.
Browser/OS: reproducible in the new Block Editor on staging-trunk.dotcms.cloud. Reproducible on main.
Steps to Reproduce
- Have a contentlet with a Block Editor field (e.g. a Blog
body) with multiple versions whose Block Editor content differs.
- Open the contentlet → History / Versions.
- Compare the working version against a previous version.
- Actual: the Block Editor field renders as a garbled/overlapping diff, and/or the field shows empty /
null.
- Expected: the field renders the same readable comparison the legacy editor produces.
Screenshots: legacy vs new comparison (legacy readable, new garbled), and the field-by-field view showing Body as null.
Root Cause (likely, needs confirmation)
DotContentCompareBlockEditorComponent renders two hidden editor instances ([style.display:none]) purely to convert the field's stored JSON into HTML (TipTap getHTML()); that HTML feeds the visible diff (dotDiff pipe). The feature flag switches which engine does the conversion (dot-block-editor new vs dot-old-block-editor legacy). Two suspects:
| Suspect |
Detail |
| HTML shape mismatch |
The new editor emits different markup than the legacy editor; the dotDiff pipe mangles it → garbled, overlapping diff. |
| Empty HTML timing |
htmlWorkingValue$ / htmlCompareValue$ are built in ngAfterViewInit, subscribing to the editor's valueChange. If the new editor emits before that subscription (or never re-emits), the HTML stays empty → the null / blank field. |
Relevant file: core-web/libs/portlets/edit-ema/ui/src/lib/dot-content-compare/components/dot-content-compare-block-editor/dot-content-compare-block-editor.component.{ts,html}
Acceptance Criteria
dotCMS Version
main
Severity
Medium - Some functionality impacted
Links
Problem Statement
In the content version History Compare, a Block Editor (StoryBlock) field renders incorrectly when the new Block Editor is active (
FEATURE_FLAG_NEW_BLOCK_EDITORon, now the default after #36254). With the legacy editor the same comparison renders correctly.Symptom observed:
null.Impact: version comparison is effectively unusable for Block Editor fields under the new editor. Because #36254 flipped the new editor on by default, this now affects all instances. Front-end only; the stored content is unaffected.
Browser/OS: reproducible in the new Block Editor on
staging-trunk.dotcms.cloud. Reproducible onmain.Steps to Reproduce
body) with multiple versions whose Block Editor content differs.null.Root Cause (likely, needs confirmation)
DotContentCompareBlockEditorComponentrenders two hidden editor instances ([style.display:none]) purely to convert the field's stored JSON into HTML (TipTapgetHTML()); that HTML feeds the visible diff (dotDiffpipe). The feature flag switches which engine does the conversion (dot-block-editornew vsdot-old-block-editorlegacy). Two suspects:dotDiffpipe mangles it → garbled, overlapping diff.htmlWorkingValue$/htmlCompareValue$are built inngAfterViewInit, subscribing to the editor'svalueChange. If the new editor emits before that subscription (or never re-emits), the HTML stays empty → thenull/ blank field.Relevant file:
core-web/libs/portlets/edit-ema/ui/src/lib/dot-content-compare/components/dot-content-compare-block-editor/dot-content-compare-block-editor.component.{ts,html}Acceptance Criteria
nullwhen the underlying content is present.FEATURE_FLAG_NEW_BLOCK_EDITORboth ON and OFF (no regression for the legacy path).dotCMS Version
mainSeverity
Medium - Some functionality impacted
Links