Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFatal error: Cannot declare class WP_Block_Styles_Registry, because the name is already in use #17444
Comments
This comment has been minimized.
This comment has been minimized.
This is already fixed in the plugin, it will be released with Gutenberg 6.5 |
This comment has been minimized.
This comment has been minimized.
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 comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
@mcsf and @youknowriad - I think this will happen for all websites that have Gutenberg version which declares |
This comment has been minimized.
This comment has been minimized.
If I remember properly. Versions prior to 6.6 are not compatible with WordPress 5.3 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
It seems the problem of the BlockStyles class affects versions 6.2, 6.3, 6.4. |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
@jorgefilipecosta, can you detail this issue? |
This comment has been minimized.
This comment has been minimized.
Hi @mcsf, There are some JS when we try to publish:
|
This comment has been minimized.
This comment has been minimized.
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 comment has been minimized.
This comment has been minimized.
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):