Home Forums WoodMart support forum PHP Warning that is null creates an empty shop

PHP Warning that is null creates an empty shop

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #612912

    supp0rt
    Participant

    Hello,

    I am trying to figure out a strange behaviour that happens on the shop age.

    I see the error below

    [PHP Warning]: Attempt to read property “query_vars” on null in wp-content/plugins/woocommerce/includes/class-wc-query.php on line 873
    Stack trace:
    #0 wp-content/plugins/woocommerce/includes/class-wc-query.php(873): cstm_error_handler()
    #1 wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/Filterer.php(150): get_main_meta_query()
    #2 wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php(459): get_filtered_term_product_counts()
    #3 wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php(560): get_filtered_term_product_counts()
    #4 wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php(244): layered_nav_list()
    #5 wp-includes/class-wp-widget.php(394): widget()
    #6 wp-includes/widgets.php(845): display_callback()
    #7 wp-content/themes/woodmart/sidebar.php(34): dynamic_sidebar()
    #8 wp-includes/template.php(810): require_once()
    #9 wp-includes/template.php(745): load_template()
    #10 wp-includes/general-template.php(136): locate_template()
    #11 wp-content/plugins/woocommerce/templates/global/sidebar.php(22): get_sidebar()
    #12 wp-content/plugins

    [PHP Warning]: Attempt to read property “post_count” on null in wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-price-filter.php on line 80
    Stack trace:
    #0 wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-price-filter.php(80): cstm_error_handler()
    #1 wp-includes/class-wp-widget.php(394): widget()
    #2 wp-includes/widgets.php(845): display_callback()
    #3 wp-content/themes/woodmart/sidebar.php(34): dynamic_sidebar()
    #4 wp-includes/template.php(810): require_once()
    #5 wp-includes/template.php(745): load_template()
    #6 wp-includes/general-template.php(136): locate_template()
    #7 wp-content/plugins/woocommerce/templates/global/sidebar.php(22): get_sidebar()
    #8 wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include()
    #9 wp-content/plugins/woocommerce/includes/wc-template-functions.php(1053): wc_get_template()
    #10 wp-includes/class-wp-hook.php(324): woocommerce_get_sidebar()
    #11 wp-includes/class-wp-hook.php(348): apply_filters()
    #12 wp-includes/plugin.php(517): do_action()
    #13 wp-content/themes/woodmart/woocommerce/archive-product.php(40): do_action()
    #14 wp-includes/template-loader.php(106): include()
    #15 wp-blog-header.php(19): require_once()
    #16 index.php(17): require()

    Because of this warning, the shop page appears empty every time the warnings above appear, and the price filter does not appear at all. But reappear after a while.

    I have also deactivated all the plugins and left only Woodmart and WooCommerce and the error still happens. I have also tried using WooCommerce and Storefront, and the error did not appear.

    Can you please assist me on this one?

    Best Regards

    #613092

    Artem Temos
    Keymaster

    Hello,

    Please disable any plugins not directly related to our theme and provide us with your admin access details. We will log in to your dashboard and investigate the issue. Please ensure that you only keep the following plugins that are necessary for our theme to work correctly:
    – WoodMart core
    – WooCommerce
    – Elementor/WPBakery Page Builder

    Thank you in advance.

    #613826

    supp0rt
    Participant

    Hello,

    I have provided a login using a token. The rest of the plugins are disabled.

    Let me know if you need anything else.

    Best Regards

    #613883

    Artem Temos
    Keymaster

    Could you please write step-by-step instructions on how to reproduce the issue on your website?

    #613951

    supp0rt
    Participant

    Unfortunatly no. I hope that you can help me on that one. I only have the debug logs and when the error appears every time I check the shop page there are no products on it and the filter by price does not appear at all. After that, I made the test site, disabled all plugins and left only Woodmart and woocommerce, and the error was still there. No cache was involved. After a while, the products and the price reappeared. So I do not know what is going on except for the warnings above.

    The settings that I have on the woocommerce might cause this problem. by enabling the lookup table? That might create conflicts with Woodmart?

    That’s all I know so far. except for the warnings with the stack trace that I pasted above.

    Let me know if there is something else I can help with.

    Best Regards

    • This reply was modified 1 hour, 47 minutes ago by supp0rt. Reason: Added some extra information
Viewing 5 posts - 1 through 5 (of 5 total)