• Resolved lmvn

    (@lmvn)


    Hello,

    I’m experimenting a strange bug on review count number on product pages of my website. The reviews are displaying correctly in the review tab but it seems the theme isn’t taking into account the total number of reviews for the products, thus displaying a false number for the total reviews.

    For example, on one product it says it has 9 reviews while we have over 21 reviews for this item. On another, it says it has only 1 review while we have 4 reviews.

    When I noticed this issue today, I deactivated all the plugins on my website except for Woocommerce and purged the cache, without success. The issue was still there. I also checked if it was an issue caused by some settings not allowing some unlogged customer to leave a review but everything looked fine on that side too.

    So I’m starting to suspect something went wrong in Storefront’s display of the number of reviews. I have the latest updates for both theme, plugins and WordPress and using a custom child theme based on Storefront. The issue is present on Firefox and Chrome.

    Thanks in advance for any help ! m(_ _)m

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter lmvn

    (@lmvn)

    Hello again,

    could you please help me out for the issue I’m facing on my website because it’s still there… My message was the only one ignored amongst all the others around the same date. ??

    If a dev could give me at least some clues of where to start for debugging the issue, I could also help and check on my side.

    Thanks

    Hi @lmvn

    To check if this is an issue with Storefront only; can you switch to another theme, and tell me if the number of reviews is then correct?

    Thread Starter lmvn

    (@lmvn)

    Hi @senff,

    thanks for your answer !

    I have switched the storefont theme with the basic wordpress twenty-twenty theme but unfortunately reviews number is still broken.

    Does this mean it’s actually a Woocommerce issue..?

    Senff

    (@senff)

    Hey @lmvn

    Since the issue appears with other themes as well, it’s safe to say that it is not an issue with Storefront. Though, it’s not clear if it’s caused by WooCommerce itself, or if it’s an issue with any other plugin you have active.

    The best way to find out is to do the following:
    – Disable all plugins except for WooCommerce.
    – Clear your browser cache, and the cache on your site if you have one there.
    – Test to see if the issue has been resolved.

    If that resolves the issue, then one-by-one you can switch back your theme and re-enable your plugins, testing in between, until the problem appears again. This will then give you an idea about which plugin is the one causing the conflict.

    If the issue still appears when all plugins (except WooCommerce) are deactivated, it’s best to post this in the general WooCommerce forum.

    Thread Starter lmvn

    (@lmvn)

    Hey @senff

    thanks a lot for your reply.Yeah I also think it’s not clear yet what is causing the issue but today I gathered a bit more informations as I was trying other things to debug the issue and noticed the following:

      Oddly enough, I noticed that the review number is correct on the admin side. In Admin > Comments section you can see the number of reviews displayed in a small grey balloon icon. This one is correct, the one with an issue is the one on the front side of the shop.
      Made a quick check on my child theme’s function.php but I didn’t implement anything special about reviews there. Also a quick check in Woocommerce and Storefront php files but at first sight didn’t detect anything strange with my small php knowledge.
      When replying to a verified customer’s review today to thank him for his review, I noticed the review counters on that particular product page went from 3 (which is the correct one) to…2 ! One review went missing when I posted the answer… never seen that issue before in live.
      Some older replies to old reviews (around 2016) are completly missing, like if they were erased. This is a real problem as we need to redo the whole reply work over again.
      The point above made me remember something else that may (or may not) be of importance regarding this issue : I remember stumbbeling upon an issue regarding user privilege to reply to reviews a while ago. I use a separate account for replying to reviews, which I gave at first Editor level rights. But maybe a month or two ago, I noticed the rights had changed and that I couldn’t edit nor reply to any review anymore. So I checked on the web and changed that account’s rights to Shop Manager and it solved my issue. But then around the same time I had a Woocommerce update and that’s where the fun started : reviews count went wrong and some older reviews went missing

    Hope this details help understand the situation better.

    And thanks for your advice but I actually already did what you recommend (all plugin disable, clear cashes and check out if issue is resolved) as explained in my first post:

    When I noticed this issue today, I deactivated all the plugins on my website except for Woocommerce and purged the cache, without success. The issue was still there. I also checked if it was an issue caused by some settings not allowing some unlogged customer to leave a review but everything looked fine on that side too.

    Thanks a lot for your help so far ! ??

    Any updates on this?

    I am experiencing the same issue.

    Thread Starter lmvn

    (@lmvn)

    @madjedo Unfortunately no, it isn’t fixed yet on my side.

    I have contacted Woocommerce support regarding this issue beginning December but haven’t had the time to setup the staging site they need in order to debug.

    Do you perhaps have any clue on what’s the issue ?

    Hi @lmvn , yes I did, I discussed this with Woo support.

    It’s about the same that is described here: https://github.com/woocommerce/woocommerce/issues/27668#issuecomment-694155101

    Basically I had reviews in my database still set as ‘comment’. From support the proposed solution was:

    Fixing this will require a couple of steps. First, you would need to run a query against the database. Before doing so, please do make a backup in case something goes wrong you can restore from that backup. I’d also recommend testing this on the staging site first. A query like this will fix the comment type to be correct:

    UPDATEwp_commentsSETcomment_type= 'review' WHEREcomment_post_IDIN ( SELECTIDFROMwp_postsWHEREpost_type= 'product' );

    Once that is done, getting the correct count can be accomplished by unapproving a comment and then re-approving that same comment

    Please backup your site before doing any of this please, I am no expert and seek help if you need assistance with SQL queries.

    Thread Starter lmvn

    (@lmvn)

    Hi @madjedo, thanks a lot for your input !

    It exactly was what I thought happened : reviews had a wrong type assigned in the database for some reason after the Woocommerce update.

    Thanks to your help, I could solve on my own that part of the issue and review count and rating count is now showing the correct review count and rating count.

    There’s one more issue I haven’t solved though. I have replies missing that where assigned to these reviews that switched types. I have checked in my database but didn’t find them so this makes me think they might have been erased during the bug… Did something similar occur to you too ?

    If not, do you think I should reply to the github in order to warn that the bug not only changed the type of the comments but also erased comments ?

    Thread Starter lmvn

    (@lmvn)

    As the problem is solved, I’ll close this thread. Thanks again @madjedo for your help !!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Wrong reviews count on product pages’ is closed to new replies.