Upgrade from Sugar Calendar 3.0.0 to 3.1.x broke layout
-
In WordPress core as of 5.8.0, the value of
should_load_separate_core_block_assets
is set tofalse
by default.In WordPress 5.9.0,
_add_default_theme_supports
added a filter to setshould_load_separate_core_block_assets
totrue
for block themes.In general, by default, from what I can tell, classic themes expect block assets to be loaded together, block themes expect assets to be provided separately. The filter gives us the ability to customize that.
In Sugar Calendar Lite (and Pro) 3.1.0,
should_load_separate_core_block_assets
is filtered totrue
as part of the init process for the blocks included with the plugin. This overrides the default decision by core and causes the entire cascade of styles provided by WordPress to change drastically.This change broke the layout on the home page of a client site. We were able to narrow it down and resolve with a new action on
init
that resetsshould_load_separate_core_block_assets
back to its intended value.IMO,
should_load_separate_core_block_assets
is a heavy-handed decision and plugins should not be filtering it for all sites without setting the expectation that a major core default is being changed. Instead, plugins should be able to work around their own cascade issues with separate stylesheets or approaches that may rely on the current value ofshould_load_separate_core_block_assets
.Thanks for listening! ??
- The topic ‘Upgrade from Sugar Calendar 3.0.0 to 3.1.x broke layout’ is closed to new replies.