Open joemaller opened 1 year ago
Delete the transient directly from the DB table:
DELETE FROM `wp_options` WHERE option_name = '_transient_wp_core_block_css_files';
wp-cli command:
wp --allow-root transient delete wp_core_block_css_files
Delete the transient on theme-activation:
add_action('after_switch_theme', function () {
delete_transient('wp_core_block_css_files');
});
Escaped shell command from docker-compose.yml:
echo -e "🐛 \033[36mClearing buggy \033[90mwp_core_block_css_files \033[36mtransient\033[0m" &&
mariadb -h db $${MYSQL_DATABASE} \
-e "DELETE FROM wp_options \
WHERE option_name = \"_transient_wp_core_block_css_files\"" &&
For some reason the
wp_core_block_css_files
is persisting and preventing the loading of some styles. This has resulted in visual discrepancies between development and production deploys, despite identical code.Initial thinking is to add the following:
after_switch_theme
hook, likely as part of ideasonpurpose/wp-theme-initAddwp-cli transient delete wp_core_block_css_files
to the bootstrap scriptwp_options
table when running theme-activateSee also WordPress#59111
Note that wp-config.php hacks didn't work easily, (see #71) and adding
define( 'WP_DEVELOPMENT_MODE', 'core' );
didn't fix this issue anyway (as suggested here)