You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a document containing such a node is loaded into the blocks editor and saved, the unknown node is sometimes silently dropped from the saved blocks.__somersault__.value — even when the block was not touched at all.
Warning
This is flaky: in repeated identical save cycles, the node survived in one run and was gone in another.
Steps to reproduce
Create a Document whose somersault value contains an adapted block node:
Problem: Adapted Plone block nodes can be dropped on save
Problem
Classic/adapted Plone blocks, for example
teaser, are stored in thesomersaultvalue as Plate nodes with:{ "type": "unknown" }These nodes carry the original block data, for example:
{ "@type": "teaser", "href": "...", "preview_image": "..." }They are rendered through:
When a document containing such a node is loaded into the blocks editor and saved, the
unknownnode is sometimes silently dropped from the savedblocks.__somersault__.value— even when the block was not touched at all.Warning
This is flaky: in repeated identical save cycles, the node survived in one run and was gone in another.
Steps to reproduce
somersaultvalue contains an adapted block node:{ "type": "unknown", "@type": "teaser", "id": "abc123", "children": [ { "text": "" } ] }Open the document in the blocks editor via
@@edit.This is also reproducible via
@@translatefrom#23.Save without modifying the block.
Inspect
blocks.__somersault__.valueon the saved content.Expected behavior
The
unknownnode is preserved.The adapter renders it, and the data round-trips untouched.
Actual behavior
The node is intermittently missing from the saved value.
This results in silent data loss of the adapted block.
Suspected cause
Editor normalization may remove node types it does not recognize, possibly racing with lazily loaded editor plugins.
Hypothesis:
If the adapter/plugin for the node type is not registered yet when normalization runs, the node may be treated as invalid and removed.
Impact
Silent data loss for any adapted Plone block when a page is opened and saved in the blocks editor.
This affects the regular
@@editflow, not only@@translate.Context
Observed while implementing and testing the
@@translateroute in#23.This was not introduced by that work. It is reproducible with the plain editor flow.