Skip to content

Fix "This block has encountered an error and cannot be previewed" error in Block Editor#61

Open
csalzano wants to merge 1 commit into
createwithrani:mainfrom
csalzano:fix/sprintf-missing-import
Open

Fix "This block has encountered an error and cannot be previewed" error in Block Editor#61
csalzano wants to merge 1 commit into
createwithrani:mainfrom
csalzano:fix/sprintf-missing-import

Conversation

@csalzano
Copy link
Copy Markdown

@csalzano csalzano commented Mar 12, 2026

Fix "This block has encountered an error and cannot be previewed" error in Block Editor and "ReferenceError: sprintf is not defined in superlist-item edit" in JS console.

sprintf was used in edit.js but never imported from @wordpress/i18n. WordPress no longer provides sprintf as a global, causing the block to crash with "This block has encountered an error" in the editor.

Fixes #60

sprintf was used in edit.js but never imported from @wordpress/i18n.
WordPress no longer provides sprintf as a global, causing the block
to crash with "This block has encountered an error" in the editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

“This block has encountered an error and cannot be previewed”

1 participant