Support » Plugin: WooCommerce » Hidden products are counted in Catalog and causes empty spaces

  • Resolved dominmax

    (@dominmax)


    Hello,
    I found a few reported problems like this and every time the thread is closed with no result.

    I have had a store for 2 years and I noticed this behaviuor lately.
    So the problem could started on the previous version of Woocommerce.

    Hidden products are counted in Catalog and causes empty spaces.

    I tried everything.
    – all plugins (except woocommerce) are disabled,
    – I changed the theme to Storefront,
    – updated WP, Woo, all plugins (they are still disabled) to the latest version
    – I tried to use every Woocommerce Tool to clear and refresh every possible stuff (from WooCommerce transients to Clear analytics cache)

    **Describe the bug**
    To present the issue I created a new category on my TEST site. I attached 13 products to the category and set 7 of them to be Hidden (Catalog visibility).
    I set woocommerce to show 6 products on one catalog page.

    The category counts 13 products but shows 6 of them in a strange way:
    – on the first page – one is hidden and there is one empty place (5 instead of 6)
    https://ar.neodirect.pl/kategoria-pracy/aatest/
    – on the second page – 6 products are hidden and there is empty page (0 of 6)
    https://ar.neodirect.pl/kategoria-pracy/aatest/page/2/
    – on the third page – there is 13th product visible

    Of course it should be just one page with 6 products. And there is quite a mess.
    I have thousands of products and the shop is in 3 languages (wpml) it would be a problem to create a new one.
    So I need so much to find the cause of the issue.

    **To Reproduce**
    I tried to reproduce the behaviour on the new installation but I could not.
    I can offer access to the test page if needed.

    **Expected behavior**
    When catalog visibility is set to “hidden” the product should NOT show up in any catalog/archive page and should not be counted.

    **Isolating the problem (mark completed items with an [x]):**
    – [YES] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
    – [YES] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/).
    – [NO] I can reproduce this bug consistently using the steps above.

    **WordPress Environment**
    WordPress from 4.9 to 5.5.1 and WooCommerce 3.8.1 to 4.6.1

    Thank you in advance for help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Hi there,

    For the site at https://ar.neodirect.pl/kategoria-pracy/aatest/, can you share a copy of the status report as found under **WooCommerce > Status**?

    Thread Starter dominmax

    (@dominmax)

    Hello,
    Thank you for your reply.
    The status is:

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://ar.neodirect.pl
    Site address (URL): https://ar.neodirect.pl
    WC Version: 4.6.1
    REST API Version: ✔ 4.6.1
    WC Blocks Version: ✔ 3.4.0
    Action Scheduler Version: ✔ 3.1.6
    WC Admin Version: ✔ 1.6.2
    Log Directory Writable: ✔
    WP Version: 5.5.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: LiteSpeed
    PHP Version: 7.2.22
    PHP Post Max Size: 128 MB
    PHP Time Limit: 300
    PHP Max Input Vars: 10000
    cURL Version: 7.47.1
    OpenSSL/1.0.1e
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.30-33
    Max Upload Size: 128 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 4.6.1
    WC Database Prefix: wp_
    Total Database Size: 128.36MB
    Database Data Size: 92.58MB
    Database Index Size: 35.78MB
    wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 0.11MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 1.52MB + Index: 0.70MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 0.30MB + Index: 0.41MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 0.25MB + Index: 0.19MB + Engine InnoDB
    wp_commentmeta: Data: 0.01MB + Index: 0.02MB + Engine MyISAM
    wp_comments: Data: 0.02MB + Index: 0.02MB + Engine MyISAM
    wp_freshmail_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_freshmail_stats: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM
    wp_litespeed_img_optm: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_mediafromftp_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_nksubcounters: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_nksubsubscribers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_options: Data: 2.88MB + Index: 0.12MB + Engine MyISAM
    wp_pmxi_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_pmxi_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_pmxi_images: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
    wp_pmxi_imports: Data: 0.17MB + Index: 0.00MB + Engine InnoDB
    wp_pmxi_posts: Data: 0.42MB + Index: 0.27MB + Engine InnoDB
    wp_pmxi_templates: Data: 0.11MB + Index: 0.00MB + Engine InnoDB
    wp_postmeta: Data: 52.42MB + Index: 15.32MB + Engine MyISAM
    wp_posts: Data: 16.24MB + Index: 1.37MB + Engine MyISAM
    wp_po_plugins: Data: 3.52MB + Index: 3.75MB + Engine InnoDB
    wp_pum_subscribers: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_termmeta: Data: 0.30MB + Index: 0.31MB + Engine InnoDB
    wp_terms: Data: 0.67MB + Index: 0.59MB + Engine MyISAM
    wp_term_relationships: Data: 5.09MB + Index: 9.10MB + Engine MyISAM
    wp_term_taxonomy: Data: 1.63MB + Index: 0.61MB + Engine MyISAM
    wp_ultimate_csv_importer_log_values: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_ultimate_csv_importer_manageshortcodes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_ultimate_csv_importer_shortcodes_statusrel: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_usermeta: Data: 0.27MB + Index: 0.21MB + Engine MyISAM
    wp_users: Data: 0.02MB + Index: 0.03MB + Engine MyISAM
    wp_wcpdf_invoice_number: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.06MB + Index: 0.03MB + Engine InnoDB
    wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 0.19MB + Index: 0.09MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.09MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 1.52MB + Index: 1.20MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woof_stat_buffer: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woof_stat_tmp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_yoast_indexable: Data: 0.41MB + Index: 0.17MB + Engine InnoDB
    wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_yoast_primary_term: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
    wp_yoast_seo_links: Data: 1.52MB + Index: 0.47MB + Engine InnoDB
    wp_yoast_seo_meta: Data: 0.47MB + Index: 0.00MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    : 1
    acf-field: 3
    acf-field-group: 1
    attachment: 7978
    custom_css: 1
    customize_changeset: 10
    inspire_invoice: 10
    nav_menu_item: 177
    oembed_cache: 19
    page: 59
    polylang_mo: 3
    popup: 6
    popup_theme: 7
    post: 80
    product: 9304
    redirect_rule: 24
    revision: 731
    shop_order: 459
    team: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (2) ###
    
    UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
    DavidAnderson – 1.16.33
    
    WooCommerce: by Automattic – 4.6.1
    
    ### Inactive Plugins (1) ###
    
    Limit Login Attempts Reloaded: by WPChef – 2.15.2
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: PLN (zł)
    Currency Position: right_space
    Thousand Separator: 
    Decimal Separator: ,
    Number of Decimals: 0
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-catalog (exclude-from-catalog-fr)
    exclude-from-catalog (exclude-from-catalog-en)
    exclude-from-search (exclude-from-search)
    exclude-from-search (exclude-from-search-fr)
    exclude-from-search (exclude-from-search-en)
    featured (featured)
    featured (featured-fr)
    featured (featured-en)
    outofstock (outofstock)
    outofstock (outofstock-en)
    outofstock (outofstock-fr)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #757 - /
    Cart: #824 - /koszyk/
    Checkout: #761 - /kasa/
    My account: #825 - /moje-konto/
    Terms and conditions: #11019 - /regulamin-wraz-z-polityka-prywatnosci/
    
    ### Theme ###
    
    Name: Storefront
    Version: 2.8.0
    Author URL: https://woocommerce.com/
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Canceled: 1
    Oldest: 2020-10-28 09:02:32 +0000
    Newest: 2020-10-28 09:02:32 +0000
    
    Complete: 953
    Oldest: 2020-10-27 17:23:56 +0000
    Newest: 2020-10-28 14:50:35 +0000
    
    
    • This reply was modified 1 year, 1 month ago by dominmax.
    Thread Starter dominmax

    (@dominmax)

    Hello again,
    In last days I did some more operations to eliminate some buzz.

    I delete all attributes and tags – no difference.

    Checked wp_term_relationships in DB and there are records related with wp_term named exclude-from-catalog.

    When I set in woocommerce options:
    Out of stock visibility: Hide out of stock items from the catalog – checked,
    then it behaviour the same like with hidden – there are “ghosts” products in the catalog (set as out of stock). This is an important symptom I guess.

    I also exported products from the example category and imported to another clean new version of WP-WOO and then it behave correctly.
    BUT when I exported products the same category on ar.neodirect.pl, then deleted the products and imported them again (built in woo importer/exporter) – the problem did not disapperar on the site.

    What else is involved in the process of showing the catalog products considering database?
    Can it be connected with wpml mess and 3 languages?

    I hope for your help.
    Dominik

    Plugin Support mouli a11n

    (@mouli)

    Hi @dominmax
    I recommend that you clean up the database as follows.
    Go to:

    • WooCommerce ➔ Status ➔ Tools ➔ Product Lookup Tables ➔ Regenerate
    • WooCommerce ➔ Status ➔ Tools ➔ Delete Orphans ➔ Delete orphaned variations
    • WooCommerce ➔ Status ➔ Tools ➔ Term Counts ➔ Recount Terms

    I hope that helps you to figure it out.
    Feel free to get back to us if you have further questions.

    • This reply was modified 1 year ago by mouli a11n. Reason: typos
    Thread Starter dominmax

    (@dominmax)

    Hi @mouli,
    Thank you for the reply. It does not help. I tried the way dozen times. As metioned before also tried lots of things – did copy of the site, delete attributes, tags, all plugins, switched to Storefront etc.
    I think the problem is connected with WPML and its translation duplicates.
    E.g. when I search for one of the title:
    https://ar.neodirect.pl/?s=Cisza+wyborcza&post_type=product
    You can see the three instantces of the title (I have 3 languages – polish, translated english and french that is not translated but is created by wpml plulgin as a duplicate of polish version). And I think that can do the mess.

    That is why I ask about the advice for sorting the hidden products to the end in the second topic here:
    https://wordpress.org/support/topic/how-to-sort-hidden-products-to-the-end/

    However, we can still fight this problem, because it also occurs on other users’ websites. I can provide access to the database on a test copy of the website.

    Regards,
    Dominik

    Plugin Support Ena P (a11n)

    (@drwpcom)

    Hi @dominmax. Sorry that we missed your last response.

    We’ve sometimes seen this issue with products missing their product_visibility taxonomies. Product stock is stored in two different places in the database, and when these two are out of sync, this can result in problems. This can happen when products are imported using an unofficial importer that doesn’t also set taxonomies.

    Fixing this requires changing stock status and levels of affected products, so I recommend the following steps:

    1. Export the ID, In stock? and Stock columns for all products.
    2. Make a copy of the file.
    3. In a spreadsheet editor, delete the Stock column and reverse the values of In stock. This means that wherever In Stock says 0, set it to 1 and vice versa.
    4. Import the modified file to reverse stock status of all products, with the Merge option enabled. This is to guarantee that all products have taxonomies assigned.
    5. Import the original exported file that had the real stock status and levels, also with the Merge option.
    6. In WooCommerce > Status > Tools, click the Recount terms button to refresh product list on shop / category pages.
    7. Now check if the products show up correctly on your shop pages.

    Having the same issue with search results finds 92 products most of those are hidden so search results pages only show 1-2 products each.
    Tried the solution by drwpcom but it didn’t work.

    movielady

    (@movielady2)

    @dominmax and @pragman: I’ve been wrassling with the same problem, and finally found a working fix, which I just had to tweak a bit to get it work for the dropdown version of the product category widget. HTH.

    Plugin Support Ena P (a11n)

    (@drwpcom)

    Hi @dominmax. We haven’t heard from you in a while so I’m going to go ahead and mark this thread as resolved. If you still need help with this issue or have any other questions about the WooCommerce plugin, please start a new thread.

    @pragman Since you’re not the person who originally started this topic, per the forum guidelines, would you please start your own topic? We’ll be happy to help you there. 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hidden products are counted in Catalog and causes empty spaces’ is closed to new replies.