carolinan / fullsiteediting

https://fullsiteediting.com/
289 stars 88 forks source link

Theme.json version 2 not loading styles #12

Closed ugljanin closed 2 years ago

ugljanin commented 2 years ago

Hello,

I tried changing the theme.json version to 2, and once I do that, WP is not building global styles based on theme.json. I checked and that is due to https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-theme-json.php#L357

If I change this line or install the Gutenberg plugin it can't load styles. How are you dealing with this issue?

carolinan commented 2 years ago

Hi! When styles are not loaded, it is usually because there is an error in theme.json. If you just switched the version, double check that none of the version 1 setting names are still being used. And try checking the theme.json for incorrect or missing trailing commas.

For bugs with WordPress please open issues on https://core.trac.wordpress.org/ For bugs with Gutenberg please open issues on https://github.com/WordPress/gutenberg

ugljanin commented 2 years ago

Just switching version 2 to version 1 solves the problem. I thought maybe there is some other way to overcome this issue except to install the Gutenberg plugin. Thank you for your fast reply.

carolinan commented 2 years ago

WordPress 5.8 does not support version 2. You would need Gutenberg or 5.9.