Open EverStarck opened 2 weeks ago
Hi @EverStarck
Thanks for creating the issue. I tested this on multiple sites created using https://playground.wordpress.net/ and https://instawp.com, but I cannot replicate the errors you have pointed out when checking via the Gutenberg editor plugin. Can you please share the exact steps to replicate this, once after reproducing it on the sites created using the above platforms?
We look forward to hearing from you and are happy to help you.
Thanks @josevarghese for your help checking this. I'm also able to reproduce using the latest WP 6.7 RC: https://playground.wordpress.net/?plugin=wordpress-seo&php=8.3&wp=beta
You should be able to see the warnings in the javascript console by going to the post editor, for example /wp-admin/post.php?post=2&action=edit
My guess is that it's related to WordPress now using React 18.3 since version 6.6 as mentioned in this dev note. As referenced there defaultProps is now deprecated and should be replaced with ES6 default params.
I see several instances in the Yoast SEO Wordpress plugin code that'll need to be reviewed.
After a bit more research I found that the warnings I'm noticing in the playground do seem to indeed come from Yoast (they don't show up using https://playground.wordpress.net/?php=8.3&wp=beta) however the one reported by @EverStarck about the defaultProps
is not there.
We are able to reproduce locally by setting the SCRIPT_DEBUG
to true in wp-config.php but I'll check if there's a way to reproduce it in the playground in some other way.
Hi @ibonilla
Thanks for the details. Yes, I am now able to replicate the error when the SCRIPT_DEBUG is set as true. However, when I tested with the 6.7-RC3 without setting the SCRIPT_DEBUG
, the error did not occur over it.
Hi,
I discussed this with our development team, who informed me that they are aware of the SCRIPT_DEBUG
constant showing console errors when the React dev build is loading on the page. They also have a list of tasks for making the React 19 compatibility internally. However, I would like to inform you that this compatibility change will take some time (not very soon), and you can expect a fix in future versions.
Please give us a description of what happened
When in the default Gutenberg editor, the console shows lots of
Warning: E: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead
(full error below)These errors don’t show when the Yoast plugin deactivated.
Full error:
I got this from https://wordpress.org/support/topic/yoast-error-on-mobile-view/#post-17985225, but I'm having exactly the same issue. It appears as "resolved" but I think there was a mix of issues, since the fix was for Post Editor: Editor canvas squashed by metabox in mobile/tablet view
Screenshots, screen recording, code snippet
If possible, please provide a screenshot, a screen recording or a code snippet which demonstrates the bug.
Technical info
Used versions