[wp-trac] [WordPress Trac] #53175: Block Editor: Include the theme.json infrastructure code and support
WordPress Trac
noreply at wordpress.org
Tue May 25 11:03:55 UTC 2021
#53175: Block Editor: Include the theme.json infrastructure code and support
--------------------------------------+---------------------
Reporter: youknowriad | Owner: (none)
Type: task (blessed) | Status: closed
Priority: normal | Milestone: 5.8
Component: Editor | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by noisysocks):
Hey @youknowriad, [50992] breaks style concatenation. You can see this by
navigating to `/wp-admin/load-styles.php?load=wp-components`. This should
show the CSS for `@wordpress/components` but instead results in an empty
page with status 500.
The reason is because the file which defines `WP_Theme_JSON_Resolver`
won't be imported by `load-styles.php` (and `load-scripts.php`) which
bypasses the usual WordPress initialisation steps (`wp-settings.php`).
You'll need to wrap the call to `WP_Theme_JSON_Resolver` with a
`class_exists` or import `class-wp-theme-json-resolver.php` in `load-
styles.php` and `load-scripts.php`.
This is what is causing the failures in
https://github.com/WordPress/gutenberg/pull/32176/checks?check_run_id=2663937068.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53175#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list