Gutenberg: The editor has encountered an unexpected error (plugin conflict fixed in Yoast SEO 8.1.1)

Created on 3 Sep 2018  Β·  24Comments  Β·  Source: WordPress/gutenberg

Describe the bug
After editing a new post I now get the following error: "The editor has encountered an unexpected error" with the buttons [Attempt Recovery] [Copy Post Text] [Copy Error]

The Attempt Recovery button does not appear to do anything or resolve the issue.

The Copy Error text is:
TypeError: Cannot read property 'getCollectionByRoute' of undefined
at t.value (https://www.narrowroadcapital.com/wp-content/plugins/wordpress-seo/js/dist/wp-seo-post-scraper-810.min.js?ver=8.1:1:145344)
at t.value (https://www.narrowroadcapital.com/wp-content/plugins/wordpress-seo/js/dist/wp-seo-post-scraper-810.min.js?ver=8.1:1:144551)
at jc (https://www.narrowroadcapital.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:134:123)
at gc (https://www.narrowroadcapital.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:127:223)
at vb (https://www.narrowroadcapital.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:126:230)
at ub (https://www.narrowroadcapital.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:126:65)
at wg (https://www.narrowroadcapital.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:137:182)
at Ze (https://www.narrowroadcapital.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:41:24)

This also now happens when I try to create a new post using the Gutenberg editor.

Editing the post in the Classis Editor still works.

Using Gutenberg 3.7.0

To Reproduce
Steps to reproduce the behavior:
This happens when I create a new post or edit an existing post.

Expected behavior
I would expect the existing post to be editable in the new Gutenberg editor and for new posts to open up the Gutenberg editor in edit mode.

Screenshots
If applicable, add screenshots to help explain your problem.
edit post narrow road capital wordpress

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome, Firefox, Edge
  • Version All browsers current, all plugins and core updated to current versions

Additional context
Here's the Gravity Forms debug report which gives a summary of the site configuration:

Gravity Forms

Version: 2.3.3 βœ”
Upload folder permissions: Writable βœ”
Output CSS: Yes
Output HTML5: Yes
No-Conflict Mode: No
Currency: AUD
Background updates: No
Locale: en_AU

Add-Ons

Campaign Monitor: by rocketgenius - 3.7 βœ”

WordPress

Home URL: https://www.narrowroadcapital.com
Site URL: https://www.narrowroadcapital.com
WordPress Version: 4.9.8 βœ”
WordPress Multisite: No
WordPress Memory Limit: 40M
WordPress Debug Mode: No
WordPress Debug Log: Yes
WordPress Script Debug Mode: No
WordPress Cron: Yes
WordPress Alternate Cron: No
Background tasks: Yes βœ”

Active Theme

Infinity Pro: by StudioPress (http://www.studiopress.com/) - 1.1.2 βœ”
Genesis (Parent): by StudioPress (https://www.studiopress.com/) - 2.6.1 βœ”

Active Plugins

Advanced Custom Fields PRO: by Elliot Condon - 5.7.4 βœ”
Akismet Anti-Spam: by Automattic - 4.0.8 βœ”
Content Views: by CVSOFT LLC - 2.0.2 βœ”
Glue for Yoast SEO & AMP: by Joost de Valk - 0.4.3 βœ”
Google Analytics for WordPress by MonsterInsights: by MonsterInsights - 7.1.0 βœ”
Gutenberg: by Gutenberg Team - 3.7.0 βœ”
Jetpack by WordPress.com: by Automattic - 6.4.2 βœ”
Slide-In: by Jeffri Hong (Incsub), Victor Ivanov (Incsub), Ve Bailovity (Incsub) - 1.1.3 βœ”
Stop Media Comment Spamming: by DeveloperWil - 1.8.0 βœ”
TablePress: by Tobias BΓ€thge - 1.9.1 βœ”
VaultPress: by Automattic - 1.9.6 βœ”
W3 Total Cache: by Frederick Townes - 0.9.7 βœ”
Wordfence Security: by Wordfence - 7.1.11 βœ”
WP Remote: by maekit - 2.8.4.1 βœ”
Yoast SEO: by Team Yoast - 8.1 βœ”
Zero Point Development Support: by Wil Brown - 0.0.1 βœ”

Web Server

Software: LiteSpeed
Port: 443

PHP

Version: 7.0.31 βœ”
Memory Limit: 256M
Maximum Execution Time: 30
Maximum File Upload Size: 2M
Maximum File Uploads: 20
Maximum Post Size: 8M
Maximum Input Variables: 1000
cURL Enabled: Yes (version 7.60.0)
OpenSSL: OpenSSL 1.0.2k-fips 26 Jan 2017 (268443839)
Mcrypt Enabled: Yes
Mbstring Enabled: Yes
Loaded Extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, bcmath, dom, gd, imap, json, exif, mcrypt, mysqli, mysqlnd, PDO, pdo_mysql, pdo_sqlite, pgsql, Phar, posix, pspell, soap, sockets, tidy, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip

MySQL

Version: 5.6.39 βœ”
Database Character Set: latin1
Database Collation: latin1_swedish_ci

[Status] Duplicate [Type] Plugin Interoperability

All 24 comments

It's a Yoast conflict.

Yoast is releasing a bug fix 8.1.1 on Monday.

Disable Yoast for now.

Yoast offers this temporary workaround.

https://github.com/Yoast/wordpress-seo/issues/10867#issuecomment-417696845

Thanks - I'll wait for bug fix.

Yoast 8.1.1 has been released. Please update and activate your Yoast plugin, and confirm the issue is addressed.

Confirmed: After applying the update I can now create new posts and edit existing posts in the Gutenberg block editor.

Thanks!

I'm having this same issue today. Disabled Yoast and still cannot access the editor. Do we know of another plugin that's causing a problem?

The same issue here. I have the latest Yoast version 9.1 at the moment. Please help.

Expecting the same issue: "The editor has encountered an unexpected error".
All plugins expecting gutenberg are disabled.

TypeError: Cannot read property 'show_ui' of undefined
at https://example.com/wp-content/plugins/gutenberg/build/editor/index.js?ver=1543787464:50:254238
at i (https://example.com/wp-content/plugins/gutenberg/vendor/lodash.min.59550321.js:6:91)
at An.filter (https://example.com/wp-content/plugins/gutenberg/vendor/lodash.min.59550321.js:99:338)
at https://example.com/wp-content/plugins/gutenberg/build/editor/index.js?ver=1543787464:50:254203
at ph (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:97:88)
at eg (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:125:307)
at fg (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:126:168)
at wc (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:138:237)
at fa (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:137:115)
at gg (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:135:196)

Is it possible to provide a plugin-based fix?
Thanks!

Expecting the same issue: "The editor has encountered an unexpected error".
All plugins expecting gutenberg are disabled.

TypeError: Cannot read property 'show_ui' of undefined
at https://example.com/wp-content/plugins/gutenberg/build/editor/index.js?ver=1543787464:50:254238
at i (https://example.com/wp-content/plugins/gutenberg/vendor/lodash.min.59550321.js:6:91)
at An.filter (https://example.com/wp-content/plugins/gutenberg/vendor/lodash.min.59550321.js:99:338)
at https://example.com/wp-content/plugins/gutenberg/build/editor/index.js?ver=1543787464:50:254203
at ph (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:97:88)
at eg (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:125:307)
at fg (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:126:168)
at wc (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:138:237)
at fa (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:137:115)
at gg (https://example.com/wp-content/plugins/gutenberg/vendor/react-dom.min.713f0afa.js:135:196)

Is it possible to provide a plugin-based fix?
Thanks!

Disabling Yoast doesn't fix this error anymore.

@digitalformula Update WordPress to 5.0 and disable Gutenberg.

Does the issue still persist in that scenario?

@digitalformula Update WordPress to 5.0 and disable Gutenberg.

Does the issue still persist in that scenario?

No, the errors are gone with Gutenberg disabled.

I've installed the "Disable Gutenberg" plugin and disabled Gutenberg everywhere. The errors are now gone and I can edit posts again.

@zeldor

What version of WordPress and Gutenberg are you using?

What theme? Is it up-to-date?

@GlennMartin1 FYI, in case it helps - I've got the following:

Wordpress 5.0, updated from 4.x about an hour ago
Akismet
Disable Gutenberg
Disqus
Divi Builder
Jetpack
Markdown Editor
SyntaxHighlighter Evolved
Visual Form Builder
Wordfence
Yoast

Using "Extra" theme by Elegant Themes (hooks into Divi Builder mentioned above).

Disabling all plugins with Gutenberg still enabled doesn't remove the errors.

The only thing that's allowed normal usage, so far, is the complete disable of Gutenberg.

This is a production site but isn't overly critical so I'm happy to test stuff on it, if you need someone to (as long as they're not _too_ drastic).

@zeldor

What version of WordPress and Gutenberg are you using?

What theme? Is it up-to-date?

Performed yesterday a upgrade to Wordpress 5.0, Gutenberg version 4.6.1.
Theme: Wintersong Pro Theme.

Now this issue is present without Gutenberg plugin

Just installed the plugin "disable-gutenberg", to be able to edit and write posts.
https://de.wordpress.org/plugins/disable-gutenberg/

Theme was verified with studiopress - the developer of the theme, its approved for usage with Wordpress 5.0.
I change the theme to something basic, the described editor-issue is still present(all plugins are deactivated).

Just installed the plugin "disable-gutenberg", to be able to edit and write posts.
https://de.wordpress.org/plugins/disable-gutenberg/

This worked for us. Wordpress version 5.0.1
Applying nginx config would conflict on our other routes.

@GlennMartin1 Is there any further info on this issue? I've got it on my own site and also have it on our main production site, too. Updated to 5.0.3 and now can't create or edit posts. Installing the disable Gutenberg plugin allows post creation and editing but that's a hack.

I've also tried the Nginx changes referenced by #12655 (comment) but no joy there either.

Ignore the above. It was indeed Nginx config, but my server was configured in a way that pointed to the wrong site conf file. After editing the correct one, everything seems to be working.

i use this plugin https://wordpress.org/plugins/classic-editor/ and my problem is solve
this plugin save data without api , and no conflict issue

I have the same issue as in the first post. Deactivating Yoast 10.0.1 (which is the latest version ATM) fixes the error but this is not long term solution.

I had the same issue, disabling elementor plugin fixed this for me

Having the same issue. After deactivating Yoast the issue seems to go away.

My issue was a conflict between ACF pro module and Yoast, everything worked after updating both

(100% WORKING SOLUTION) "The Editor Has Encountered An Unexpected Error" this issue is actually caused when some plugin or the WordPress software itself is updated to a newer version. What happens is, the old files of the system are cached either thorough the WordPress caching plugin that one might be using or through Cloudflare or any CDN and in some cases, the hosting company where your WordPress site is hosted, also keeps a copy of the cached files. Your browser too, sometimes keep a local copy of those cached files.
Now the problem is that when you try to access the updated files, all those above mentioned combination of cached files that are now invalid, are served to your browser and thus, you face that or that kind of errors.

Thus, the easiest and the most legitimate way to solve this is to clear the cache of your website from each and every possible place that holds your site's cache. Check out this easy and detailed article that I have written that will help you fix this problem easily: How To Fix The Editor Has Encountered An Unexpected Error In WordPress.

Was this page helpful?
0 / 5 - 0 ratings