Skip to content
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

Block Editor: Deprecated select( 'core/edit-post' ).getPreferences #18561

Open
4 of 9 tasks
grappler opened this issue Jun 14, 2022 · 7 comments
Open
4 of 9 tasks

Block Editor: Deprecated select( 'core/edit-post' ).getPreferences #18561

grappler opened this issue Jun 14, 2022 · 7 comments

Comments

@grappler
Copy link

  • I've read and understood the contribution guidelines.
  • I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

Deprecation notice as of WordPress 6.0

select( 'core/edit-post' ).getPreferences is deprecated since version 6.0. Please use select( 'core/preferences' ).get instead.

Used here:

const firstLoad = ! select( "core/edit-post" ).getPreferences().panels[ "yoast-seo/document-panel" ];

Please describe what you expected to happen and why.

No deprecation notice.

How can we reproduce this behavior?

  1. Edit a post on a WordPress 6.0 installation with the block editor
  2. Check the browser console

Technical info

  • If relevant, which editor is affected (or editors):
  • Classic Editor
  • Gutenberg
  • Classic Editor plugin
  • Which browser is affected (or browsers):
  • Chrome
  • Firefox
  • Safari
  • Other

Used versions

  • WordPress version: 6.0
  • Yoast SEO version: 19.0
  • Gutenberg plugin version:
  • Classic Editor plugin version:
  • Relevant plugins in case of a bug:
  • Tested with theme:
@stormwerxdigital
Copy link

stormwerxdigital commented Jun 30, 2022

I think I was wrong on Yoast. It's still throwing the error, but I believe the performance issues were caused by other plugins. I got everything working with Yoast again currently.

@CathyXXX
Copy link

I have multiple sites with the same issue. As a result the featured image of the page doesn’t load. I have to either deactivate the Yoast plugin or reload the page several times before the featured image loads in.

@ktmrepo
Copy link

ktmrepo commented Sep 2, 2022

I'm also noticing same issue... Deactivated Yoast SEO and premium... Page editor is fine again.

@fusionsquare
Copy link

fusionsquare commented Nov 3, 2022

Same issue here. We have to deactivate Yoast SEO

Update: WordPress version: 6.1

@awemous
Copy link

awemous commented Nov 17, 2022

Same problem here. WP 6.1 - get this error.

@rayice
Copy link

rayice commented Nov 20, 2022

Getting same error

Same issue here, WP 6.1.

deprecated.min.js?ver=6c963cb9494ba26b77eb:2 select( 'core/edit-post' ).getPreferences is deprecated since version 6.0. Please use select( 'core/preferences' ).get instead.

@mmikhan
Copy link
Member

mmikhan commented Nov 24, 2022

Internal board: IM-1970

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

Successfully merging a pull request may close this issue.

8 participants