wordpressadvanced-custom-fieldswordpress-gutenbergacfpro

ACF Block states "This block has encountered an error and cannot be previewed." when switching between edit and preview mode


After updating to WordPress 6.7, if I switch between the "edit" and the "preview" mode in the block-editor, the block breaks stateing "This block has encountered an error and cannot be previewed."

This happens to all blocks.

I'm getting a JS error "Uncaught TypeError: this.tabs is undefined" and "The above error occurred in the component:"


Solution

  • As of WordPress 6.7 SCRIPT_DEBUG, true enables the React StrictMode. This causes an js-error which breaks the block(s).

    Just set define('SCRIPT_DEBUG', false); in your wp-config.php as a temporary workaround. As mentiond here the ACF-Team should is working on a permanent fix.