@ubeo Does adding the aforementioned should_load_separate_core_block_assets filter make the issue go away?
@westonruter Yes it does.
Just chiming in to note that I’ve run into style enqueue issues on 10ish sites since 6.9 dropped. The most common issue I’ve experienced is with the front-end css assets for the WPForms plugin failing to enqueue.
There seems to be some sort of environmental factor at play, since in a few cases that I’ve investigated, local or development mirrors of a site have functioned normally, even when freshly synced from a production site that’s experiencing the issues. I’ve tested different PHP versions, made sure PHP configs were identical… even had a production site with failed enqueues while a dev site using the same PHP stack under the same Plesk managed server worked fine.
That filter above seemed to resolve the issue in all instances I’ve tested.
Probably worth also mentioning that the impacted sites have all been running Disable Gutenberg or similar classic editor style plugin. I haven’t run into problems with any Elementor sites yet.
We’ve experienced this issue on Genesis sites using the monochrome pro theme as well.
I use classic theme twenty fourteen. Since update to wordpress 6.9 unicode signs like ✆ are not displayed anymore. With rollback to 6.8.3. it words again. The workarounds does not fix it. Changing to twenty four or five did not fix it either.
-
This reply was modified 4 months ago by
Ralf R..
@westonruter I have had come across two sites so far that I’ve built that have issues since 6.9, neither use Elementor, both were affected quite badly so I have had to revert to WP 6.3. I am now going to review other sites I’ve developed and see if there are others affected.
Do you have any new informations about that? Some of our custom themes are not loading scripts from wp_enqueue_scripts after update to 6.9. On 6.8.3 everything works fine. For now we can’t figure out why. Are there any described breaking changes in WP 6.9 related with that?
Dave
(@puddingtonbeer)
@szymonmil111 a workaround is posted above, but check your caches too. Add the following to functions.php or plugin init.
add_filter( ‘should_load_separate_core_block_assets’, ‘__return_false’, 100 );
WordPress editor is missing a bunch of functionality. It is becoming more and more frustrating dealing with this product.
As a workaround for sites experiencing this issue, I’ve just published a small single-file plugin that allows you to remain on 6.9 but opt out of loading separate core block styles. Naturally, the plugin is called Load Combined Core Block Assets. This plugin includes the ability for you to test loading separate core block styles via a query parameter. Once 6.9.1 is released with the fix, the plugin could inform you to re-test, so that the plugin can be deactivated and uninstalled at that time.
If you added the following to your site via a theme or plugin:
add_filter( 'should_load_separate_core_block_assets', '__return_false' );
Please remove this, and instead install the plugin. This will help ensure you don’t get stuck with loading the combined core block assets indefinitely. The use of combined core block assets means much more CSS is added to the page than is likely needed, and this can negatively impact page load time (e.g. FCP and LCP). By WordPress 6.9 loading separate block assets on demand, this also allows for small stylesheets to be inlined to further reduce render-blocking resources.
@westonruter Do you confirm it is a Worpdress issue and that it will be fixed in WP 6.9.1 ?
@ubeo I don’t know the details of your situation, but you can see the details from one verified defect on Trac: #64354. In this case, it comes down to the order of stylesheets changing when separate core block styles are used. If this is not your situation, then it may be that you have blocks that aren’t being sent through do_blocks() and so WordPress isn’t discovering the styles it needs to add to the page. This is described in the related section of the frontend performance field guide.
@westonruter God Bless you, Weston! 🙂 I have around 15 sites (custom build themes) and was freeking out what is happening. I have tested this code and it solved the problem. Could you tell us what exactly is happening? In my case, the problem was with the gallery block and the columns setting. Regardless of the columns number setting, the gallery block displays all images in one column. Another thing: some basic font and size adjustments made in gutenberg editor also not applied in the front end. But this line of code solves it. Thank you again!
@dankanic Please see my previous reply. To reiterate, there are two potential causes:
- The order of the stylesheets may be different in 6.9 potentially causing a CSS cascade issue. The fix for this issue is underway. To work around this, install the Load Combined Core Block Assets plugin (which is preferred over manually filtering
should_load_separate_core_block_assets).
- You may have markup which is not going through
do_blocks() meaning that WordPress is not able to discover the separate block stylesheets that it needs to enqueue. This is described in the related section of the frontend performance field guide, namely:
if you notice that you are now missing some expected styles, it could be that you have content which is not being run through do_blocks() and thus it is not being enqueued on demand. Beyond ensuring your block markup is being run through do_blocks() (which is a known issue for the Latest Posts block), you can fix this by either explicitly enqueueing the necessary separate block-specific styles. For example, to enqueue the stylesheet for the Video block:
add_action(
'wp_enqueue_scripts',
function () {
wp_enqueue_style( 'wp-block-video' );
}
);
In this latter case, it may not be practical to rework your theme so that all of the markup is being processed as blocks by WordPress via do_blocks(), and in this case you may need to leave the Load Combined Core Block Assets plugin active, or else commit to always loading the combined core block assets via:
// Try to avoid having to do this!
add_filter( 'should_load_separate_core_block_assets', '__return_false' );
Again, this is not preferred since it means you are potentially adding much more CSS to your pages than is needed, and you won’t be able to benefit from this performance improvement in 6.9.
I’m not sure how your site is constructed to know whether the cause is #1 or #2.