• Resolved scottm-ldg

    (@scottm-ldg)


    Hi, I’m seeing this critical error in my logs. I think it’s related to woocommerce product tags that no longer exist. We recently got a Google Search Console error report for a product tag archive URL that seems to cause a “Server error (5xxx)”.

    I looked into Woocommerce’s logs for the day of the server error and I could see reports of a Critical error that is being triggered by Badge Management. I’m guessing there’s some error management issue when the URL for a non-existent product tag archive is accessed.

    Within the logs, I’m seeing the same error multiple times on different days too. I’m wondering if perhaps when Google’s bots index the site they access the url of a deleted product tag archive, it’s causing this critical uncaught error message.

    Anyway here is the full error message:

    2023-07-03T13:15:42+00:00 CRITICAL Uncaught Error: Call to a member function get_style() on bool ..***/wp-content/plugins/yith-woocommerce-badges-management/includes/class-yith-wcbm-frontend.php:510
    Stack trace: 0 ../wp-content/plugins/yith-woocommerce-badges-management/includes/class-yith-wcbm-frontend.php(480): YITH_WCBM_Frontend->get_inline_css() 1 ../wp-includes/class-wp-hook.php(308): YITH_WCBM_Frontend->enqueue_scripts('') 2 ../wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) 3 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array) 4 ../wp-includes/script-loader.php(2194): do_action('wp_enqueue_scri…') 5 ../wp-includes/class-wp-hook.php(308): wp_enqueue_scripts('') 6 ../wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 7 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array) 8 ../wp-includes/general-template.php(3049): do_action('wp_head') 9 ../wp-content/themes/goodnow/header.php(25): wp_head() 10 ../wp-includes/template.php(783): require_once('/nas/content/li…') 11 ../wp-includes/template.php(718): load_template('/nas/content/li…', true, Array) 12 ../wp-includes/general-template.php(48): locate_template(Array, true, true, Array) 13 ../wp-content/themes/goodnow/archive.php(10): get_header() 14 ../wp-includes/template-loader.php(106): include('/nas/content/li…') 15 ../wp-blog-header.php(19): require_once('/nas/content/li…') 16 ../index.php(17): require('/nas/content/li…') 17 {main} thrown in ../wp-content/plugins/yith-woocommerce-badges-management/includes/class-yith-wcbm-frontend.php on line 510

    additionally here is the error from the URL of the non-existent product tag archive. It seems to spit out some CSS above the critical error warning:

    .yith-wcbm-badge.yith-wcbm-badge-text.yith-wcbm-badge-58884 { top: 0; left: 0; -ms-transform: ; -webkit-transform: ; transform: ; padding: 0px 0px 0px 0px; background-color:#265dc3; border-radius: 0px 0px 0px 0px; width:150px; height:50px; }.yith-wcbm-badge.yith-wcbm-badge-text.yith-wcbm-badge-2270 { top: 0; left: 0; -ms-transform: ; -webkit-transform: ; transform: ; padding: 0px 0px 0px 0px; background-color:#004f43; border-radius: 0px 0px 0px 0px; width:150px; height:50px; }
    There has been a critical error on this website.

    Any suggestions on how to prevent these critical errors? Is this an error management issue? Any help on this would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    I hope you’re doing well :D.

    Could you please try to replace the following file in the following path?

    wp-content/plugins/yith-woocommerce-badge-management/includes/class-yith-wcbm-frontend.php

    I added a control check for prevent the fatal error.

    Please, try it and let me know.

    Have a good day.

    Thread Starter scottm-ldg

    (@scottm-ldg)

    Hi Carlos, Thank you for the quick response!

    I’ver uploaded the updated file you linked me to. I’ll keep you posted on whether the error still happens.

    Thanks again for your help on this :]

    Thread Starter scottm-ldg

    (@scottm-ldg)

    Hi again Carlos,

    I’ve checked the logs since uploading your fix, I think that has resolved the problem.

    Thank you again for your help on this

    Plugin Support Alessio Torrisi

    (@alessio91)

    Hi there,

    happy to see that problem is fixed now.

    If you’re happy with our product and satisfied of our support, please write a review here, it will be much appreciated ??

    ellice909

    (@ellice909)

    I am getting the same error. I ended up disabling the plug-in. Any chance this fix will be released officially soon? I am using 3.1.0 and still getting this error.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CRITICAL Uncaught Error: Call to a member function get_style()’ is closed to new replies.