Fatal error after updating to Blocksy 2.1.50 on WordPress 7.0 (without WooCommer
-
Hello Blocksy Team,
After updating my website to Blocksy Theme 2.1.50 and Blocksy Companion 2.1.50, my site started showing a fatal error immediately after the update. Environment
- WordPress: 7.0
- PHP: 8.3.6
- Theme: Blocksy 2.1.50
- Blocksy Companion: 2.1.50
- WooCommerce: Not installed
- Server: Nginx on Ubuntu Linux
Fatal Error
PHP Fatal error: Uncaught Error: Call to undefined function Blocksy\DbVersioning\blocksy_get_woo_single_layout_defaults() File: wp-content/themes/blocksy/inc/classes/db-versioning/v2-1-50.php Line: 21Stack TraceBlocksy\DbVersioning\V2150->migrate()
Blocksy\DbVersioning->init()
WP_Hook->apply_filters()
do_action()
wp-settings.phpInvestigation
The function actually exists in:
wp-content/themes/blocksy/inc/components/woocommerce/common/layer-defaults.phpHowever, during the execution of the database migration (
V2150::migrate()), the function is not yet available, causing the fatal error.This happens on a website that does not use WooCommerce. Temporary Workaround
As a temporary fix, I added the following check at the beginning of the
migrate()method in:wp-content/themes/blocksy/inc/classes/db-versioning/v2-1-50.phpif (! function_exists('blocksy_get_woo_single_layout_defaults')) { return; }After adding this check, the website works normally again.
It looks like the migration should verify that the function is available (or that WooCommerce-related components are loaded) before calling it.
Could you please verify whether this is a bug in Blocksy 2.1.50?
Thank you.
El debate ‘Fatal error after updating to Blocksy 2.1.50 on WordPress 7.0 (without WooCommer’ está cerrado a nuevas respuestas.