• Resolved leodefaveri

    (@leodefaveri)


    Hi!

    Sometimes I have received this error in an ecommerce, through Log WordPress by Email. Any suggestions of what may be happening? I use Varnish (cloudpanel) + redis + cloudflare. Thank you!

    Plugin atual: W3 Total Cache (versão 2.8.7) PHP versão 8.3.17 Detalhes do erro ================ Um erro do tipo E_ERROR foi causado na linha 228 do arquivo /wp-content/plugins/w3-total-cache/Root_Loader.php. Mensagem de erro: Uncaught Error: Call to undefined function W3TC\get_current_screen() in /wp-content/plugins/w3-total-cache/Root_Loader.php:228

    Stack trace:

    #0 /wp-includes/class-wp-hook.php(324): W3TC\Root_Loader->w3tc_modify_query_obj()

    #1 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()

    #2 /wp-includes/plugin.php(565): WP_Hook->do_action()

    #3 /wp-includes/class-wp-query.php(1881): do_action_ref_array()

    #4 /wp-includes/class-wp-query.php(3852): WP_Query->get_posts()

    #5 /wp-content/themes/woodmart/inc/actions.php(344): WP_Query->query()

    #6 /wp-includes/class-wp-hook.php(326): woodmart_custom_404_page()

    #7 /wp-includes/plugin.php(205): WP_Hook->apply_filters()

    #8 /wp-includes/template.php(103): apply_filters()

    #9 /wp-content/plugins/perfmatters/inc/functions.php(1042): get_query_template()

    #10 /wp-content/plugins/perfmatters/inc/functions.php(954): perfmatters_disable_login_url()

    #11 /wp-includes/class-wp-hook.php(324): perfmatters_wp_loaded()

    #12 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()

    #13 /wp-includes/plugin.php(517): WP_Hook->do_action()

    #14 /wp-settings.php(726): do_action()

    #15 /wp-config.php(115): require_once('...')

    #16 /wp-load.php(50): require_once('...')

    #17 /wp-admin/admin.php(34): require_once('...')

    #18 {main} thrown

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @leodefaveri

    Thank you for reaching out and I am happy to help!
    This may happen if it isn’t loaded and available until after admin_init has been fired. Thank you for taking the time to share this
    Can you please replace the /wp-content/plugins/w3-total-cache/Root_Loader.php line 228

    from: $screen = get_current_screen();

    To:

        if ( function_exists( 'get_current_screen' ) ) {
    $screen = get_current_screen();
    } else {
    return;
    }

    Lee me know if this helps and this will be fixed in the upcoming release

    Thanks!

    Thread Starter leodefaveri

    (@leodefaveri)

    Hi @vmarko ! Thank you for your response!

    I made the suggested change and I need to wait, as the error occurs at any time. If it occurs again, I will come back to warn. Thank you very much for the quick response to the problem!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @leodefaveri

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Frequent errors’ is closed to new replies.