Description
When Real-Time Collaboration (RTC) is enabled, table block cell content renders blank in the editor. The CRDT document initialization replaces RichText cell content (strings) with empty {} objects in the block attributes, while originalContent and post_content remain intact.
Preview and front-end rendering are unaffected — only the editor view is broken.
Steps to reproduce
- Create a post with a
core/table block containing data in header and body cells
- Enable Real-Time Collaboration (RTC) with the HTTP polling provider
- Save the post
- Reload the editor
Expected: Table cells show their content
Actual: All table cells render blank (empty textboxes)
Technical analysis
Performed via browser DevTools on a live WordPress.com P2 site running Gutenberg 22.7.0:
Block attributes are corrupted
// Every cell's content is an empty plain object:
tableBlock.attributes.head[0].cells[0].content
// → {} (Object with zero keys, not a RichTextData instance)
tableBlock.attributes.body[0].cells[0].content
// → {} (same)
Normal (non-RTC) table cells store content as strings ("Product", "<a href='...'>Link</a>"). With RTC enabled, the CRDT initialization replaces these with empty {} objects.
originalContent is intact
tableBlock.originalContent
// → '<figure class="wp-block-table"><table><thead><tr><th>Product</th>...'
// All cell data present and correct
Serialization vs rendering divergence
getEditedPostContent() returns correct HTML with all table data (serializes from originalContent)
- React renders from block attributes (
head/body arrays) → blank cells
isValid: true because validation checks against originalContent, not attributes
The corruption happens at CRDT init time
Even after deleting _crdt_document post meta, the bug reproduces on the very next page load. The CRDT system creates a new document from the parsed blocks, and during that initialization, table cell RichText content is not properly captured.
The issue is specifically with how the CRDT document handles RichText attribute sources (source: 'html') stored as block attributes in the table block. Table cells use source: 'html' attributes (unlike paragraph/heading blocks which use source: 'rich-text' on innerHTML). The CRDT initializer appears to not handle this attribute type correctly.
Workaround
Re-parsing the block from originalContent and updating attributes in the store restores the data:
const reparsed = wp.blocks.parse('<!-- wp:table ... -->' + tableBlock.originalContent + '<!-- /wp:table -->');
wp.data.dispatch('core/block-editor').updateBlockAttributes(tableBlock.clientId, {
head: reparsed[0].attributes.head,
body: reparsed[0].attributes.body,
});
This is a temporary in-memory fix — the CRDT re-corrupts on next page load.
Environment
- WordPress.com (Simple sites)
- Gutenberg 22.7.0
- RTC provider: HTTP polling
- Affects:
core/table block (likely any block using source: 'html' RichText attributes)
Related
- Reported by multiple users across different WordPress.com P2 sites
- Bug persists after Gutenberg 22.7.0 update (which fixed other RTC/polling issues)
Description
When Real-Time Collaboration (RTC) is enabled, table block cell content renders blank in the editor. The CRDT document initialization replaces RichText cell content (strings) with empty
{}objects in the block attributes, whileoriginalContentandpost_contentremain intact.Preview and front-end rendering are unaffected — only the editor view is broken.
Steps to reproduce
core/tableblock containing data in header and body cellsExpected: Table cells show their content
Actual: All table cells render blank (empty textboxes)
Technical analysis
Performed via browser DevTools on a live WordPress.com P2 site running Gutenberg 22.7.0:
Block attributes are corrupted
Normal (non-RTC) table cells store content as strings (
"Product","<a href='...'>Link</a>"). With RTC enabled, the CRDT initialization replaces these with empty{}objects.originalContent is intact
Serialization vs rendering divergence
getEditedPostContent()returns correct HTML with all table data (serializes fromoriginalContent)head/bodyarrays) → blank cellsisValid: truebecause validation checks againstoriginalContent, not attributesThe corruption happens at CRDT init time
Even after deleting
_crdt_documentpost meta, the bug reproduces on the very next page load. The CRDT system creates a new document from the parsed blocks, and during that initialization, table cell RichText content is not properly captured.The issue is specifically with how the CRDT document handles RichText attribute sources (
source: 'html') stored as block attributes in the table block. Table cells usesource: 'html'attributes (unlike paragraph/heading blocks which usesource: 'rich-text'on innerHTML). The CRDT initializer appears to not handle this attribute type correctly.Workaround
Re-parsing the block from
originalContentand updating attributes in the store restores the data:This is a temporary in-memory fix — the CRDT re-corrupts on next page load.
Environment
core/tableblock (likely any block usingsource: 'html'RichText attributes)Related