roots / bedrock

WordPress boilerplate with Composer, easier configuration, and an improved folder structure
https://roots.io/bedrock/
MIT License
6.15k stars 1.16k forks source link

Upgrading WP from 6.x to 6.3.1 stops loading core block css from wp-includes #687

Closed hphioolen closed 12 months ago

hphioolen commented 12 months ago

Version

1.21.1

What did you expect to happen?

After updating composer.json to WP core version to 6.3 the site remains the same

What actually happens?

Core block CSS is no longer loaded i.e. https://example.com/wp-includes/blocks/navigation/style.css?ver=6.2.1 is no longer listed in the Network inspector as being loaded. As the core is no longer used, this results in breaking the site.

This issue can be resolved in 2 ways

Steps to reproduce

This issue is also spoken of in this topic: https://wordpress.org/support/topic/core-block-stylesheets-not-loading/

The issue can be reproduced by installing a bedrock with a lower version than 6.3 and then upgdrading through composer to 6.3.1

System info

No response

Log output

No response

Please confirm this isn't a support request.

Yes

Log1x commented 12 months ago

This is not an issue/bug with Bedrock.

oxyc commented 12 months ago

We ran into this and the cause is that deployer/capistrano/ansistrano deployment flows change the path to stylesheets each deploy when symlinking to the latest release folder. Core assumes the paths can be cached (which is a bad assumption) https://github.com/WordPress/WordPress/blob/832b4660fdf88ce1ff074fc59f038381f75c77a9/wp-includes/blocks/index.php#L48-L53

For now we ended up adding this as a last step to our deploy

wp transient delete wp_core_block_css_files

Last I checked there wasn't any bug report on trac but I've been meaning to create one

retlehs commented 12 months ago

@oxyc Looks like a fix is slated for 6.3.2: https://core.trac.wordpress.org/ticket/59111