Skip to content
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

Gutenberg v17.2.3 fatal errors in WordPress 6.5 alpha due to HTML API #57216

Closed
david-binda opened this issue Dec 19, 2023 · 5 comments
Closed
Labels
[Feature] HTML API An API for updating HTML attributes in markup [Type] Bug An existing feature does not function as intended

Comments

@david-binda
Copy link
Contributor

Description

Testing the WordPress 6.5 alpha with latest Gutenberg revealed that the changes to HTML API in https://core.trac.wordpress.org/changeset/57179/ produces PHP fatal error due to changed logic of text spans tracking where some properties were renamed, but are still expected in Gutenberg's custom HTML API classes.

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 28459024 bytes) in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Step-by-step reproduction instructions

  1. have a WordPress install with the WordPress Beta tester plugin installed
  2. install the Gutenberg plugin
  3. upgrade to WordPress 6.5-alpha
  4. Create a new post, as simple as having a Title as post_title and following as post_content:
<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc nisi nulla, gravida id fermentum scelerisque, euismod nec libero. Maecenas euismod, ligula id faucibus gravida, ipsum tortor dignissim tellus, et aliquet orci dui a erat. Quisque vel arcu venenatis, venenatis eros sed, laoreet ipsum. Maecenas vel augue maximus, mattis eros eu, volutpat ante. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean vel tellus magna. Donec nisl metus, tempor sit amet lobortis at, consectetur vel nulla. Proin cursus sagittis ante ut iaculis.</p>
<!-- /wp:paragraph -->
  1. attempt to view the post on front-end

Screenshots, screen recording, code snippet

List of all related PHP Warnings, Notices, and the Fatal error

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1623

Deprecated: substr(): Passing null to parameter #2 ($offset) of type int is deprecated in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1626

Warning: Undefined property: WP_HTML_Text_Replacement::$end in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1609

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 28459024 bytes) in /srv/www/wordpress-two/public_html/wp-content/plugins/gutenberg/lib/compat/wordpress-6.4/html-api/class-gutenberg-html-tag-processor-6-4.php on line 1621

Environment info

WordPress 6.5-alpha ( past the 57179 changeset )
Gutenberg 17.2.3 (reproducible even with Gutenberg 17.3.0 RC1)
PHP 8.2 (reproducible even on PHP 7.4)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@david-binda david-binda added the [Type] Bug An existing feature does not function as intended label Dec 19, 2023
@dmsnell
Copy link
Contributor

dmsnell commented Dec 19, 2023

Thanks for bringing this up @david-binda. #56928 was supposed to fix this or prevent it, so I'll have to take a look and see what is referencing those older property names.

@david-binda
Copy link
Contributor Author

@dmsnell I've just re-tested the issue with the core change present and #56928 applied and it seems like it really fixes / prevents the issue. Feels like a false alarm 😊

@dmsnell
Copy link
Contributor

dmsnell commented Dec 19, 2023

@david-binda thanks for your detailed reproduction steps. it took me a while to reproduce because this doesn't seem to be failing on Gutenberg trunk and WordPress trunk.

I'm not sure exactly why this failed, though the backport fix isn't in Gutenberg 17.2.3 so that makes sense to me.

Are you able to reproduce on trunk/trunk?

@jordesign jordesign added the [Feature] HTML API An API for updating HTML attributes in markup label Dec 19, 2023
@david-binda
Copy link
Contributor Author

You are right @dmsnell , I'm unable to reproduce it on trunk/trunk ( with the #56928 applied ). I guess I'm going to close the issue. Thanks for the details!

@ockham
Copy link
Contributor

ockham commented Dec 21, 2023

I'm not sure exactly why this failed, though the backport fix isn't in Gutenberg 17.2.3 so that makes sense to me.

Yeah, that's probably it. I should've thought about that when we were working on #56928; might've been worth including the fix in a 17.2.x point release 🤔

Anyway, 17.3.0 is out now, which includes #56928, so we should be good indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] HTML API An API for updating HTML attributes in markup [Type] Bug An existing feature does not function as intended
4 participants