• 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:
    21

    Stack TraceBlocksy\DbVersioning\V2150->migrate()
    Blocksy\DbVersioning->init()
    WP_Hook->apply_filters()
    do_action()
    wp-settings.php

    Investigation

    The function actually exists in:

    wp-content/themes/blocksy/inc/components/woocommerce/common/layer-defaults.php

    However, 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.php
    if (! 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.

Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)
  • Moderador Sergio

    (@kallookoo)

    Hola @marlinis

    Para soporte en ingles; https://wordpress.org/support/forums/

    Moderador Sergio

    (@kallookoo)

    @sharonuv Te comento un par de cosas aqui mismo:

    • Ante todo gracias por apoyar a la comunidad, pero por favor lee las Bienvenido, instrucciones y manual.
    • Por algún motivo creo casi todos tus mensajes estaban en spam, puede ser la ip, pero si notas que sigue pasando, no te preocupes cada x tiempo se revisan

    Como veras esta consulta esta cerrada, motivo cada idioma tiene su foro, no se puede preguntar en ingles en el foro de Español, etc. Si revisas la doc, veras otras normas, reglas, consejos sobre como contribuir en los foros, 😉

Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)

El debate ‘Fatal error after updating to Blocksy 2.1.50 on WordPress 7.0 (without WooCommer’ está cerrado a nuevas respuestas.