Skip to content

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

@david-binda

Description

@david-binda

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] HTML APIAn API for updating HTML attributes in markup[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions