• Resolved Dave Loodts

    (@davelo)


    Hi, since WordPress 6.0 we see strange issues on multiple sites.
    In the sidebar we have the Products Categorie widget (settings: show product counts, show hierarchy). The shop page displays the ‘main” categories.

    For unclear reason we notice that some “main categories” on the shop page are disappearing. When we run a “recount terms”, they are back.

    Second bizar issue in the sidebar: the categorie list shows the numbers of products as we have set this via the widget. But for unclear reason the count-number is becoming incorrect. Some categories get the number 0, they have indeed no products on main level categorie; but on a subcategory level.
    When we run a “recount terms”, the zero numbers go away and a “normal” number is shown.

    We have this issue ion multiple sites. Both sites uses WPML and when the shop owners ad products, they choose a subcategorie, and don’t select the main category. Meaning: via the admin in the Product Category listing, the main categories have the count 0.

    So, i’m guessing there is some issue over there. Maybe some issue with the latest cache improvements in WP6.0.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @davelo,

    Thanks for reaching out!

    This sounds like something related to cache. Do you have caching plugins enabled on your sites? If yes and the plugin(s) are disabled do you regularly purge the cache? Also, does the server where the sites are hosted have any active caching system?

    To narrow down a bit to what could be causing the issue would you mind taking the following steps?

    1. Temporarily switch to one of our default themes, such as Storefront (https://woocommerce.com/storefront/) to ensure that this isn’t a theme compatibility issue. Once you switch themes, can you check and see if everything functions as expected?

    2. If not, we also recommend deactivating all plugins except for WooCommerce to see if this resolves the issue at that point. If it does, then you would need to activate each plugin, one at a time, to see if you can find the conflicting extension/plugin.

    You can find a more detailed explanation on how to do a conflict test here: https://docs.woocommerce.com/document/how-to-test-for-conflicts/

    It is advisable to backup your site content and database before making any changes, and you could also duplicate the site for testing purposes if you don’t want to interrupt the live site.

    Cheers.

    Thread Starter Dave Loodts

    (@davelo)

    Hi @rainfallnixfig, thanks for the fast reply.

    Both sites uses cache, but that was also my first investigation. On 1 site i deactivated all the caching: ram & redis & wp rocket. The other site, i can’t deactivate it; it needs redis cause it’s a big site. No cache plugins are used there.
    But whatever we do here; the issue remains whatever cache is running.

    For one staging site, i switched over to the Storefront Theme. So, i am going to see if the issue comes back over here. i’ll keep your informed.

    I’m pretty convinced it has to do with WordPress 6.0; and how WooCommerce correspons with the new cache performance updates in WP6.0.
    We have this other site that uses the Redis Object Cache plugin, running that on WP5.9 was no problem. Since WP6.0 it flunks an bigger object queries. Here’s a ticket: https://www.ads-software.com/support/topic/a-get_terms-not-working-after-wp-6-0/. PLugin builder has not responded yet.

    It can’t be a coincedence that all these issues appear since WP6.0. Certainly on bigger queries like category queries in a big WooCommerce shop.

    So, annyway: i’ll keep monitoring the staging site if it comes back.

    Hi @davelo

    Thanks for sharing your observations.

    i’ll keep monitoring the staging site if it comes back

    Sounds good! We’ll be here if you need further help.

    Thread Starter Dave Loodts

    (@davelo)

    Hi @margaretwporg, @rainfallnixfig i’m closer in my investigation:

    Seems like WP6.0 introduced a new way of term caching. They cache only the term id since WP6.0, not the whole term output. But this can result in a problem of disappearing product categories in WooCommerce on category and shop pages. In cases where products are added on subcategories, and not the parent categorie. So, technically the parent term id is empty. Since the new caching is focused on saving term id’s; this can be a problem. When the cached version is loaded, some subcategories won’t be displayed cause WooCommerce thinks they are empty.

    That is quit something, right.

    There is a trac ticket for it: https://core.trac.www.ads-software.com/ticket/55837.

    I hope the devs of WooCommerce follow this trac-ticket, cause it is having an impact on WooCommerce sites. Certainly the standard WooCommerce shops with a sidebar (product widget) and a shop/category page.

    I’m suprised i don’t hear more complains, but this is a invisible problem. No store owner checks their category-pages like this; and a visitor doesn’t know either.

    Hopefully solved in 6.0.1.

    Hey @davelo,

    Have you updated to WPML 4.5.8 yet? It’s my understanding that it should have a fix for this.

    https://wpml.org/errata/wp-6-0-issues-with-terms-assigned-to-posts/

    We ran into some other sites that had variable products reverting to simple ones because of this (those are set by a taxonomy). See if that works for you and let us know if you have any trouble.

    Thanks

    We haven’t heard back from you in a while, so I’m marking this thread closed – we’ll be here if and/or when you are ready to continue.

    Thread Starter Dave Loodts

    (@davelo)

    hi @3sonsdevelopment , yes WPML is on 4.5.8.
    The issue has to do with the new caching feature in WP 6.0; as explained in my answer above. Hopefully soon a solution.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Incorrect Counting terms’ is closed to new replies.