Prerequisites
Please give us a description of what happened
Admin post editor triggers a console warning when editing a post with a thumbnail image in Gutenberg editor:
'getMedia' is deprecated since version 6.9. Please use the 'postType', 'attachment' entity via the 'getEntityRecord' function instead.
Disabling the plugin causes the warning to disappear. The console warning points to this line:
imageData = select( "core" ).getMedia( featuredImageId );
Step-by-step reproduction instructions
- Go to edit a post with Gutenberg editor https://www.DOMAIN/wp-admin/post.php?post=54885&action=edit
- Check dev tools console.
Expected results
- No console warnings present
Actual results
- Deprecation console warning
Screenshots, screen recording, code snippet
No response
Which editor is affected (or editors)
Which browser is affected (or browsers)
Device you are using
Desktop
Operating system
Windows 11
PHP version
8.2.28
WordPress version
6.9.4
WordPress Theme
Custom
Yoast SEO version
27.0
Gutenberg plugin version (if relevant)
No response
Elementor plugin version (if relevant)
No response
Classic Editor plugin version (if relevant)
No response
Relevant plugins in case of a bug
No response
Prerequisites
Please give us a description of what happened
Admin post editor triggers a console warning when editing a post with a thumbnail image in Gutenberg editor:
Disabling the plugin causes the warning to disappear. The console warning points to this line:
imageData = select( "core" ).getMedia( featuredImageId );
Step-by-step reproduction instructions
Expected results
Actual results
Screenshots, screen recording, code snippet
No response
Which editor is affected (or editors)
Which browser is affected (or browsers)
Device you are using
Desktop
Operating system
Windows 11
PHP version
8.2.28
WordPress version
6.9.4
WordPress Theme
Custom
Yoast SEO version
27.0
Gutenberg plugin version (if relevant)
No response
Elementor plugin version (if relevant)
No response
Classic Editor plugin version (if relevant)
No response
Relevant plugins in case of a bug
No response