-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Button block: Fix fatal error on WordPress 6.4 #62730
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
If there was a fatal error, then it means that no site can currently run Gutenberg with WordPress 6.4, so we should simply bump the minimum required version to WP 6.5. |
It has been 2 weeks since that error and nobody complaint, so I guess that bumping the version is a quick win. |
It "only" happens when there is a button on the page, but I assume that's a pretty common scenario. Bumping the minimum required version seems logical to me. Apart from that, with the current implementation, if I have an empty button, it won't remove it in 6.4, right? Which is still a downgrade from the implementation previous to that commit. Anyway, for me, it's fine to add this check and remove it once 6.6 is out and 6.4 is not supported anymore. Whatever you decide. |
Yes, as you mention, an empty button will appear. But still, it would be similar to what the user has in their editor screen, having parity between them. Has the "removing the button if empty" approach been discussed with design? |
I think that logic was added as a result of this issue: link. |
I would assume that if we rely on that code we would want to or need to backport the Core changes into Gutenberg. That's probably my fault for not keeping up with that. We would copy the Tag Processor class into Gutenberg and call it On the other hand we're free to wait until we're two versions ahead of the new methods so we don't have to do any backfilling. Either way: patience, or porting, should be fine. |
It seems this has been solved in this other pull request, right? |
Yes, sorry, I didn't realize this one existed. |
What?
For at least one month, Gutenberg should be compatible with WordPress 6.4
A block bindings commit added a render PHP for the button block. And is using a
WP_HTML_Tag_Processor
method that doesn't exist in 6.4.6.5 compatibility Tag processor contains it.
Screenshots or screencast
Without the fix:
With the fix: