[wp-trac] [WordPress Trac] #61112: Avoid re-constructing `WP_Theme_JSON` object from raw theme_json, instead use `WP_Theme_JSON` object inside `WP_Theme_JSON_data`

WordPress Trac noreply at wordpress.org
Fri May 24 04:40:17 UTC 2024


#61112: Avoid re-constructing `WP_Theme_JSON` object from raw theme_json, instead
use `WP_Theme_JSON` object inside `WP_Theme_JSON_data`
--------------------------+--------------------------
 Reporter:  thekt12       |       Owner:  thekt12
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  6.6
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  performance
--------------------------+--------------------------

Comment (by dd32):

 @thekt12 This would be with WordPress Trunk + Latest Gutenberg (Which is
 18.4). The PR in Gutenberg is in 18.5 (unreleased).

 This is indeed that the Gutenberg class is being preferred, but core is
 expecting a newer version of the class, which doesn't yet exist in the
 plugin.

 I can't duplicate the exact error, but I can get this:
 {{{
 Fatal error: Uncaught Error: Call to undefined method
 WP_Theme_JSON_Data_Gutenberg::get_theme_json() in wp-includes/class-wp-
 theme-json-resolver.php on line 257

 Call stack:
 WP_Theme_JSON_Resolver::get_theme_data() wp-includes/class-wp-theme-json-
 resolver.php:598
 WP_Theme_JSON_Resolver::get_merged_data() wp-includes/global-styles-and-
 settings.php:182
 wp_get_global_stylesheet() wp-includes/block-editor.php:511
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61112#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list