Unable to write a new post using the new Block Editor in WordPress? The chances are you’re getting “The editor has encountered an unexpected error” in WordPress.

Block editor throws this error when a plugin or a piece of functionality code in your theme isn’t compatible with the Block editor. You can resolve this error by finding the faulty plugin or a code in your theme.

To do so, we’ll fire up the Inspect tool in Chrome and go to the Console tab to see which scripts are blocking the block editor from loading.

Hover your mouse cursor over the first script that is being shown in the console to see the full URL of the script on your site. In our case, it was the following:

.../wp-content/plugins/wordpress-seo/js/dist/wp-seo-post-scraper-810.min.js?ver=8.1

The above script is from the Yoast SEO plugin. This plugin recently received an update and that might have caused the issue with Block editor. To resolve the problem, you’ve two options:

  • Contact the developer of the plugin to let them know about the issue with their plugin and the Block editor. And while the developer fixes the problem, rollback to the previous version of the plugin which worked fine with Block.
  • Deactivate the plugin. If the plugin having issues with Block editor isn’t important for you, deactivate/uninstall it. Simple.

We were able to fix “The editor has encountered an unexpected error” in Block editor by rolling back to a previous version of Yoast SEO. But your problem could be with a different plugin. Just head over to the Console in Chrome to see which java-scripts are conflicting with the Block editor and try to fix them.