Skip to content

Fix: stale missing blocks after persisted CRDT restore - #78036

Draft
karthikeya-io wants to merge 1 commit into
WordPress:trunkfrom
karthikeya-io:fix/stale-missing-crdt-blocks
Draft

karthikeya-io wants to merge 1 commit into
WordPress:trunkfrom
karthikeya-io:fix/stale-missing-crdt-blocks

Conversation

@karthikeya-io

@karthikeya-io karthikeya-io commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

#77796

What?

Closes

This PR invalidates persisted CRDT blocks when they contain a core/missing block whose original block type is now available again.

Why?

When a block type is unavailable, Gutenberg renders it as core/missing.

With RTC persistence enabled, that stale core/missing state can be restored from the persisted CRDT document after the block type becomes available again. The editor then keeps rendering core/missing after reload, even though the block type is registered.

How?

The persisted CRDT block comparison now also checks whether any restored core/missing block has an originalName that is currently registered.

Testing Instructions

  1. Install and activate a plugin that registers custom blocks, such as WooCommerce.
  2. Create a page.
  3. Add a WooCommerce block, for example the Cart Link block.
  4. Save the page.
  5. Deactivate WooCommerce.
  6. Reload the editor.
  7. Confirm the block renders as a missing block.
  8. Reactivate WooCommerce.
  9. Reload the editor.
  10. Confirm the block is restored as the WooCommerce block instead of remaining core/missing.

Testing Instructions for Keyboard

Screenshots or screencast

Before After

Use of AI Tools

@github-actions github-actions Bot added the [Package] Core data /packages/core-data label May 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Core data /packages/core-data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant