New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg version: 3.7.0 - editor has encountered an unexpected error (plugin conflict Yoast SEO 8.1) #9516

Closed
Pikkals opened this Issue Aug 31, 2018 · 10 comments

Comments

Projects
None yet
4 participants
@Pikkals

Pikkals commented Aug 31, 2018

Describe the bug

The editor has encountered an unexpected error.

Can't attempt recovery, nothing happens.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Posts'
  2. Click on 'Add New'
  3. Select Gutenburg.'
  4. See error: "The editor has encountered an unexpected error."

Copy Error:

TypeError: Cannot read property 'getCollectionByRoute' of undefined
at t.value (https://www.discerningtheworld.com/wp-content/plugins/wordpress-seo-premium/js/dist/wp-seo-post-scraper-810.min.js?ver=8.1:1:145344)
at t.value (https://www.discerningtheworld.com/wp-content/plugins/wordpress-seo-premium/js/dist/wp-seo-post-scraper-810.min.js?ver=8.1:1:144551)
at jc (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:134:123)
at gc (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:127:223)
at vb (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:126:230)
at ub (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:126:65)
at zd (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:124:449)
at ra (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:123:319)
at Object.enqueueSetState (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react-dom.min.82e21c65.js:189:231)
at r.q.setState (https://www.discerningtheworld.com/wp-content/plugins/gutenberg/vendor/react.min.ab6b06d4.js:18:441)

Desktop (please complete the following information):

  • Windows 10:
  • Chrome
  • WP version 4.9.8–en_ZA
  • Gutenberg version: 3.7.0
@designsimply

This comment has been minimized.

Contributor

designsimply commented Aug 31, 2018

Thank you for reporting this! It is very helpful to have the console error noted.

I am working to test it now and noting it may be the same issue at #9515.

@designsimply

This comment has been minimized.

Contributor

designsimply commented Aug 31, 2018

Here's what I have found so far:

This console error means in general that a plugin is relying on the `wp-api` script being present in the page. This script is no longer present by default in Gutenberg because Gutenberg is not using it anymore. Plugins should add it as an explicit dependency if they rely on it.

Would you be able to help me identify which plugins are the source of the trouble in your case? I will help work to notify them and help the plugin developers figure out how to fix the problem.

To find the source of a plugin conflict, you can temporarily disable all plugins and try creating a new post. If the error disappears, then re-activate each plugin one-by-one and test creating a new post each time until you find which plugin triggers the error.

@Pikkals

This comment has been minimized.

Pikkals commented Aug 31, 2018

Ok cool, I will check this out tomorrow if you don't mind. Will come back to you asap :)

@Pikkals

This comment has been minimized.

Pikkals commented Aug 31, 2018

Oh that was easy... it's Yoast SEO.

I think it's got to do with the categories, in the classic editor you can select a primary category, in Gutenberg that option is not available anymore... I noticed on previous version of Gutenberg the categories section was very unstable. Would show a list of categories, and other times it wouldn't.

But that's just me guessing, but it's definitely Yoasts plugin Version 8.1

@Pikkals

This comment has been minimized.

Pikkals commented Aug 31, 2018

Yip definitely Yoast SEO Version 8.1. Gutenberg now works fine with Yoast SEO Version 8.1 disabled.

@youknowriad

This comment has been minimized.

Contributor

youknowriad commented Aug 31, 2018

Yes, they're working on a fix see here #9506 (comment)

Thanks

@Pikkals

This comment has been minimized.

Pikkals commented Aug 31, 2018

Oh YAY :)

Great now we know.

@designsimply designsimply changed the title from Gutenberg version: 3.7.0 - editor has encountered an unexpected error to Gutenberg version: 3.7.0 - editor has encountered an unexpected error (plugin conflict Yoast SEO 8.1) Aug 31, 2018

@designsimply

This comment has been minimized.

Contributor

designsimply commented Aug 31, 2018

Thank you so much for testing and reporting!

Here is the related issue at Yoast SEO: Yoast/wordpress-seo#10850

@GlennMartin1

This comment has been minimized.

GlennMartin1 commented Sep 3, 2018

Yoast 8.1.1 has been released. Please update and activate your Yoast plugin, and (if applicable) deactivate and uninstall the workaround, and confirm the issue is addressed.

@Pikkals

This comment has been minimized.

Pikkals commented Sep 4, 2018

Gutenberg is working fine now on Yoast 8.1.1.

Thank you 👍

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