-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Fatal error: Cannot declare class WP_Block_Styles_Registry, because the name is already in use #17444
Comments
This is already fixed in the plugin, it will be released with Gutenberg 6.5 |
Technically speaking, WordPress 5.3 will require Gutenberg 6.5+. This is not only to fix this bug, but in general to ensure that the version shipped with WordPress isn't overridden with the older version of the plugin :) |
This just happened to me with the auto update to WordPress 5.3 that I have on one of my site. My plugin was out of date and it completely crashed my entire site. Using WP recovery tool helped resolve it. |
@mcsf and @youknowriad - I think this will happen for all websites that have Gutenberg version which declares |
If I remember properly. Versions prior to 6.6 are not compatible with WordPress 5.3 |
Aye, it seems like there should be a WP 5.3.1 fix that disables older Gutenberg versions. Defensive coding practices in Gutenberg would be a more reliable option going forward. When defining a new class or function that will ultimately land in Core (if it doesn't have I'm not sure if there's a way to automate a check for this in PRs: @jrfnl may have an idea? @mapk: Do you recall if your entire site was unavailable (eg, visiting a published post showed an error), or if it was just |
Disabling older versions of the plugin in WordPress 5.3.1 seems like a good approach as WordPress 5.3 brings a more recent version of the editor anyway. |
It seems the problem of the BlockStyles class affects versions 6.2, 6.3, 6.4. |
I've been on the forums these days, and this was not really something that was raised a lot compared to other issues (like jQuery => $). Gutenberg plugin is a developpement plugin these days and most users are on the recent versions. I think it's too overkill to do a 5.3.1 to disable these old plugins. |
@jorgefilipecosta, can you detail this issue? |
Hi @mcsf, There are some JS when we try to publish:
|
I have also encountered this same issue ( That being said, it sounds like a conflict with some other (plugin) block, as I have not been able to reproduce the error on my testing site: https://gu10testing.wpcomstaging.com, on this site I can use the Gutenberg plugin and update my posts normally. |
This just killed my site on upgrade to 5.3. If 5.3 depends on a particular plugin version in such a drastic manner, might it be made to check for that version prior to installation? |
Describe the bug
After my Wordpress installation updated to
WordPress 5.3-alpha-46118
overnight, I found that my blog wasn't working anymore. Managed to make my way to a recovery mode where I was informed that Gutenberg (6.4.0) had not activated properly. Deactivated Gutenberg, and when I tried to activate it again, I got the following errorFatal error: Cannot declare class WP_Block_Styles_Registry, because the name is already in use in /home/eugenemah/v16.imablog.net/wp-content/plugins/gutenberg/lib/class-wp-block-styles-registry.php on line 14
Same thing when I deleted Gutenberg, reinstalled, and tried to reactivate
Had been working fine under the previous alpha version (don't recall what number that was)
One of my other blogs still running
Wordpress 5.2.3
is still operating normally.To reproduce
Steps to reproduce the behavior:
Expected behavior
Gutenberg plugin is activated
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: