Home Forums WoodMart support forum Products disappear from shop page

Products disappear from shop page

Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #689327

    oliet
    Participant

    Hello,

    The problem is that products disappear from the https://lightconcept.ee/shop page. But if I log into the store’s admin panel through my hosting account (not /wp-admin), the products appear. After some time (a day or two) the goods disappear again. I also installed a copy of our shop on another server, and the products still appear. I also found a similar issue on your forum.

    https://xtemos.com/forums/topic/warning-on-php-does-not-load-the-products-in-shop-page/

    I wrote to hosting support about this issue but they claims the problem is in the theme code.

    #689335

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    Thank you so much for contacting our support center.

    To better assist you, could you kindly test the functionality with default WordPress themes such as TwentyTwenty or WooCommerce Storefront? This will help us determine whether the issue stems from our theme or elsewhere.

    Regards

    #689347

    oliet
    Participant

    It’s a working e-shop, and if I switch to another theme, it will look different because all settings are made for the Woodmart theme. I can’t switch theme and wait untill products disappear again.

    #689369

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    The products displayed on the shop page are managed by WooCommerce, not the theme itself. To verify this, you can switch to the default theme and check if the products are still displayed. If they are, it indicates a problem with WooCommerce rather than the theme.

    Kind Regards

    #689517

    oliet
    Participant

    Ok, I will create a staging website and will try to switch to the default theme and then check if this issue persists but here is the ticket with the same issue

    https://xtemos.com/forums/topic/shop-page-disappears-periodically/

    #689529

    Artem Temos
    Keymaster
    Xtemos team

    The issue is different and doesn’t look the same. Please create a staging website and test how it works with the default theme to see if it is something related to WoodMart.

    #694948

    oliet
    Participant

    Hello,

    I created a subdomain on the server where the original e-shop is located and uploaded a copy of the e-shop there. The products don’t disappear on the subdomain. The subdomain has the same server settings as the main server. What could be wrong then? I tried to find the cause myself, but I couldn’t find it. I installed the Query Monitor plugin. And when the products aren’t displayed on the page, it shows these errors.

    Attempt to read property “post_count” on null

    wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-price-filter.php:100
    WC_Widget_Price_Filter->widget()
    wp-includes/class-wp-widget.php:394
    WP_Widget->display_callback()
    wp-includes/widgets.php:845
    dynamic_sidebar(‘sidebar-shop’)
    wp-content/themes/woodmart/sidebar.php:38
    load_template(‘wp-content/themes/woodmart/sidebar.php’)
    wp-includes/template.php:745
    locate_template()
    wp-includes/general-template.php:136
    get_sidebar(‘shop’)
    wp-content/plugins/woocommerce/templates/global/sidebar.php:22
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1077
    woocommerce_get_sidebar()
    wp-includes/class-wp-hook.php:324
    do_action(‘woocommerce_sidebar’)
    wp-content/themes/woodmart/woocommerce/archive-product.php:41

    Attempt to read property “query_vars” on null

    wp-content/plugins/woocommerce/includes/class-wc-query.php:891
    WC_Query::get_main_meta_query()
    wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/Filterer.php:172
    Automattic\W\I\P\Filterer->get_filtered_term_product_counts()
    wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php:471
    WOODMART_Widget_Layered_Nav->get_filtered_term_product_counts()
    wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php:574
    WOODMART_Widget_Layered_Nav->layered_nav_list()
    wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php:250
    WOODMART_Widget_Layered_Nav->widget()
    wp-includes/class-wp-widget.php:394
    WP_Widget->display_callback()
    wp-includes/widgets.php:845
    dynamic_sidebar(‘sidebar-shop’)
    wp-content/themes/woodmart/sidebar.php:38
    load_template(‘wp-content/themes/woodmart/sidebar.php’)
    wp-includes/template.php:745
    locate_template()
    wp-includes/general-template.php:136
    get_sidebar(‘shop’)
    wp-content/plugins/woocommerce/templates/global/sidebar.php:22
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1077
    woocommerce_get_sidebar()
    wp-includes/class-wp-hook.php:324
    do_action(‘woocommerce_sidebar’)
    wp-content/themes/woodmart/woocommerce/archive-product.php:41

    Attempt to read property “query_vars” on null

    wp-content/plugins/woocommerce/includes/class-wc-query.php:903
    WC_Query::get_main_search_query_sql()
    wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/Filterer.php:304
    Automattic\W\I\P\Filterer->get_product_counts_query_using_lookup_table()
    wp-content/plugins/woocommerce/src/Internal/ProductAttributesLookup/Filterer.php:185
    Automattic\W\I\P\Filterer->get_filtered_term_product_counts()
    wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php:471
    WOODMART_Widget_Layered_Nav->get_filtered_term_product_counts()
    wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php:574
    WOODMART_Widget_Layered_Nav->layered_nav_list()
    wp-content/themes/woodmart/inc/widgets/class-widget-layered-nav.php:250
    WOODMART_Widget_Layered_Nav->widget()
    wp-includes/class-wp-widget.php:394
    WP_Widget->display_callback()
    wp-includes/widgets.php:845
    dynamic_sidebar(‘sidebar-shop’)
    wp-content/themes/woodmart/sidebar.php:38
    load_template(‘wp-content/themes/woodmart/sidebar.php’)
    wp-includes/template.php:745
    locate_template()
    wp-includes/general-template.php:136
    get_sidebar(‘shop’)
    wp-content/plugins/woocommerce/templates/global/sidebar.php:22
    wc_get_template()
    wp-content/plugins/woocommerce/includes/wc-template-functions.php:1077
    woocommerce_get_sidebar()
    wp-includes/class-wp-hook.php:324
    do_action(‘woocommerce_sidebar’)
    wp-content/themes/woodmart/woocommerce/archive-product.php:41

    #695102

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    Thank you for the detailed information and error logs you have provided.

    Since the issue does not occur on the subdomain with the same server settings, it suggests that the problem might be related to caching, plugins, or customizations on the main site rather than the WoodMart theme itself.

    Regards

    #703381

    oliet
    Participant

    Hello,

    The issue remains unresolved. I contacted WooCommerce Support, but they couldn’t help either. I renewed my paid support. Could you at least try to resolve this issue? Can we do that if the products disappear again, I’ll write to you and provide admin or FTP access if needed? If you can provide some proof that this issue isn’t related to your theme, I won’t have any further questions.

    I also found that when products disappear, if I go to the admin panel and then open the permalinks page (even without clicking the save button), the products reappear after reloading the store page. I see that this issue isn’t unique to my store. I’ve already seen several similar tickets. Here’s one of the latest:

    https://xtemos.com/forums/topic/woocommerce-products-disappearing-from-shop-page/

    #703382

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    OK, please contact me once the issue appears again and send your admin and FTP access. Keep all the plugins that are not related to our theme temporarily turned off.

    Kind Regards

    #704112

    oliet
    Participant

    Hello,

    The items have disappeared again. Is there a way to notify me when you start checking? Maybe via Facebook Messager or Viber? I could then put the website into maintenance mode. And you could safely disable the plugins. Also, as far as I know, the hosting where our website is hosted has a whitelist of IP addresses for FTP connections. And I need to add your IP in that list.

    #704146

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    You should get an email when we post replies to your topic on the forum.

    Here is an IP to whitelist 176.98.82.135

    Kind Regards

    #704211

    oliet
    Participant

    Hello,

    Ok, please let me know here when you start to check.

    #704222

    Artem Temos
    Keymaster
    Xtemos team

    Please disable all plugins that are not related to our theme and switch to the parent theme in Appearance -> Themes. I will be online for the next 3-4 hours and will check the issue asap.

    #704259

    oliet
    Participant

    I only left plugins enabled:
    Contact Form 7
    Maintenance
    Slider Revolution
    WooCommerce
    Woodmart Core
    WPBakery Page Builder

    I switched to the parent theme.
    And now the products are showing up on the store page. But I had previously tried disabling plugins and the products weren’t showing up.

    #704261

    Artem Temos
    Keymaster
    Xtemos team

    So it looks like the problem is caused either by the installed plugins or the custom code you added to the child theme. You need to enable them one by one and try to figure out which one causes this issue.

    #704263

    oliet
    Participant

    But this means the store won’t work properly during this time, as I enable plugins one by one. And since there are about 30 plugins, products disappear after 1-2 days. Searching for a plugin could take a month or more. Well, when the products disappear again, I’ll try disabling all plugins unrelated to your theme again and see if the products reappear.

    #704266

    Artem Temos
    Keymaster
    Xtemos team

    Next time, you can disable all plugins one by one and check. Take into account that it also might be related to the custom code in the child theme so please check this as well.

    #705672

    oliet
    Participant

    Hello, when the products disappeared again, I started disabling plugins one by one. When I disabled the Images to webp plugin, the products appeared. I left it disabled, but a few days later, the products disappeared again. I continued disabling products, and when I disabled Yoast SEO, the products appeared again. I left it disabled, but a few days later, the products disappeared again. When I enabled Yoast SEO, the products reappeared. This means these plugins trigger the same processes as opening the permalinks page, which also causes the products to reappear. I also tried switching to the parent theme, but the products didn’t appear.

    #705755

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    We have added a debugging code to the child theme. Please contact us once the issue happens again so we can check the logs and try to figure out what causes this problem.

    Kind Regards

    #706012

    oliet
    Participant

    Hello, the products have disappeared.

    #706197

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    We’ve reviewed the logs and extended the code responsible for generating them. Please inform us as soon as they disappear again. Additionally, it would be greatly appreciated if you could recall all the actions you took on your website just before the products disappeared. This information would be invaluable to us.

    Kind Regards

    #706402

    oliet
    Participant

    Hello, the items have disappeared again. I can’t pinpoint the exact steps that caused them to disappear. Sometimes, items appear late in the evening, but are no longer visible in the morning. And no one logs into the admin panel at night.

    #707268

    oliet
    Participant

    Hello, it seems like items are no longer disappearing. Could you please tell me what caused this and how you fixed it?

    #707559

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    Actually, we didn’t make any changes on your website. Continue monitoring your website and let me know if the issue appears again.

    Kind Regards

    #708083

    oliet
    Participant

    Hello, products are no longer disappearing. If you haven’t made any changes, then it means they stopped disappearing because of the debugging code you added. However, this isn’t a completely correct solution.
    Can you suggest what the issue might be?

    #708119

    Artem Temos
    Keymaster
    Xtemos team

    Hello,

    This code doesn’t affect anything and just writes special logs. We have just removed it from your website so please monitor how it works now.

    Kind Regards

    #708424

    supp0rt
    Participant

    Hello @admin and @oliet,

    It took me some time to investigate this issue and report back on my ticket, but I saw that the bug reported by @oliet is the same as mine, so I will try to provide some feedback here.


    @oliet
    , it would be very helpful if you could list your active plugins so I can check if we have a similar setup that might conflict with Woodmart. Also, if you have server access, please look for your access_log or access_ssl_log files. These are usually located in a folder named /logs/ or under a directory named after your domain. Pinpointing exactly what was requested (and by which User Agent) at the moment the error occurred would be invaluable. If you’re unsure how to access these, your hosting provider should be able to assist you. I will leave it to your judgment on what you want to share in public.


    @admin
    , I’ve performed extensive debugging and noticed this happens when bots aggressively crawl the site, specifically by exhausting all possible filter combinations. In my case, they were crawling every variation available in the shop. Interestingly, the issue disappeared for about two months but resurfaced today, which suggests that a robots.txt implementation is only a partial workaround and not a definitive fix. (I can provide my robots.txt if needed.)

    Below is a snapshot from my logs:

    [09-Nov-2025 02:27:51 UTC] [WC-ANOMALY] PHP warn caught: Attempt to read property "query_vars" on null in /[path-to-site]/wp-content/plugins/woocommerce/includes/class-wc-query.php:891 | uri=/shop/?filter_category=christika-antikeimena&filter_fulo=koritsi&filter_hlikia=0-eos-12-minon,18-eos-21-minon,18-eos-99-eton,3-eton-kai-ano,4-eos-6-eton&filter_brands=chillys | referer= | ua=meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler) | is_shop=yes | is_product_archive=no

    [09-Nov-2025 02:27:51 UTC] [WC-ANOMALY] backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/woodmart/woocommerce/archive-product.php'), do_action('woocommerce_sidebar'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_get_sidebar, wc_get_template, include('/plugins/woocommerce/templates/global/sidebar.php'), get_sidebar, locate_template, load_template, require_once('/themes/woodmart/sidebar.php'), dynamic_sidebar, WP_Widget->display_callback, WOODMART_Widget_Layered_Nav->widget, WOODMART_Widget_Layered_Nav->layered_nav_list, WOODMART_Widget_Layered_Nav->get_filtered_term_product_counts, Automattic\WooCommerce\Internal\ProductAttributesLookup\Filterer->get_filtered_term_product_counts, WC_Query::get_main_meta_query, {closure}
    I investigated whether something interferes with the product query. A key indicator of the problem is that while is_shop is "yes", is_product_archive returns "no".

    A var_dump of the SQL query during the error revealed the following:

    SQL
    SQL: SELECT wp_posts.* FROM wp_posts 
    WHERE 1=1 AND (wp_posts.ID = '8') AND wp_posts.post_type = 'page' 
    ORDER BY wp_posts.post_date DESC

    It appears the main query is being intercepted. Instead of running a product archive query, it defaults to a single page query (fetching the Shop page ID ‘8’). When filter widgets attempt to find products within this “page” context, they find nothing (null), resulting in an empty shop.

    Important Note: I noticed that switching to the Storefront theme makes the products reappear immediately. However, this might be a false positive for a permanent fix, as switching themes forces a flush of the rewrite rules and clears transients, which temporarily masks the symptom. The fact that products appear correctly on Category pages but fail on the main Shop page suggests that the conflict specifically affects the Shop’s “Main Query” placeholder handling within the theme.

    I have more logs from November if needed, and I am available to provide any further help to debug this.

    Just let me know.

    Best Regards

Viewing 28 posts - 1 through 28 (of 28 total)