wordpress-seo icon indicating copy to clipboard operation
wordpress-seo copied to clipboard

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

Open grappler opened this issue 3 years ago • 3 comments

  • [x] I've read and understood the contribution guidelines.
  • [x] 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: https://github.com/Yoast/wordpress-seo/blob/4496c6e1f8b84bd5d8cf34db4120a787499323b7/packages/js/src/initializers/block-editor-integration.js#L71

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
  • [x] Gutenberg
  • [ ] Classic Editor plugin
  • Which browser is affected (or browsers):
  • [x] 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:

grappler avatar Jun 14 '22 06:06 grappler

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.

stormwerxdigital avatar Jun 30 '22 01:06 stormwerxdigital

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.

CathyXXX avatar Jun 30 '22 05:06 CathyXXX

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

ktmrepo avatar Sep 02 '22 05:09 ktmrepo

Same issue here. We have to deactivate Yoast SEO

Update: WordPress version: 6.1

fusionsquare avatar Nov 03 '22 15:11 fusionsquare

Same problem here. WP 6.1 - get this error.

awemous avatar Nov 17 '22 13:11 awemous

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.

rayice avatar Nov 20 '22 13:11 rayice

Internal board: IM-1970

mmikhan avatar Nov 24 '22 12:11 mmikhan