-
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
Content may be removed on front-end during group inner container restoration on some PHP versions #30461
Comments
So for me the regex in #30460 seems correct but there might be a memory problem for long posts like this one https://3v4l.org/gUpmT |
Trying to swap the |
Edit: Test: https://3v4l.org/bVPFM |
HI, as requested here is my configuration:
|
@nbatteur Thanks for sharing your config. We believed we've fixed the issue you were experiencing, and we released Gutenberg v10.3.1 to include the relevant fixes. Can you try if that version fixes the issue for you? |
Its good ! I just tested on our test machine and everything works again with this new version. Thank you very much for the work done! |
Description
The regex used in
gutenberg_restore_group_inner_container()
does not appear to work as intended on all PHP versions for some content. This can lead to content being removed from the front-end when Gutenberg 10.3.0 is activated.An initial example of content that breaks with the regexes in that function: https://3v4l.org/Q9mVk
1
for the initialpreg_match()
and will then not process the content with the second regex.false
for the initialpreg_match()
and then assignNULL
to$updated_content
in the second regex.The sample content is structured as:
I'm not confident if this is due to a group wrapping a group, or what, but it is content that was working on my home page with Gutenberg 10.2.0 and then stopped working on upgrade to 10.3.0. Deactivating the plugin brings the content immediately back. The content always appears fine in the editor.
Related #30443, #30453
Code snippet (optional)
Markup and regex example from
gutenberg_restore_group_inner_container()
: https://3v4l.org/Q9mVkWordPress information
The text was updated successfully, but these errors were encountered: