overall_rating and rating_count not updated correctly

This topic contains 2 replies, has 3 voices, and was last updated by  Paolo 9 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #33894

    Nicole Hanusek
    Free User
    Post count: 31

    Hello,

    We’re currently building a site with the review add on and have run into a bit of a problem when we have to delete reviews.

    We’ve narrowed it down to the fact that the ‘geodir_gd_place_detail’ table isn’t getting updated correctly. Here’s an example.

    We have a place with a 5 star review and a 3 star review. The average review is correctly listed as ‘4/5 based on 2 reviews’. In the database, the overall_rating column = 8 and the rating_count = 2. This is all correct.

    However, when we go in and delete the 3 star rating, the page still says ‘4/5 based on 2 reviews’. I realized that was because the comment was in the trash. When I went into wp-admin and deleted the comment from the trash, the listing now shows ‘4 / 5 based on 1 review’. I then went into the database to investigate this further.

    The overall_rating and rating_count numbers were the same (still 8 and 2)! So it appears that these values aren’t getting updated when we delete ratings. If we go into the place listing in wp-admin and delete the review directly from there, the overall_rating value gets correctly subtracted in the database, but the rating_count remains the same.

    In the file ‘geodir_reviewrating_functions.php’, it looks like the delete function on line 504 removes the comment from the post_review table, but does not update the counters in the place detail table.

    Any idea on when we can expect a patch for this?

    Thanks in advance for your help.

    #33932

    Guust
    Moderator
    Post count: 29970

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

    #33960

    Paolo
    Site Admin
    Post count: 31206

    A valid license is required to view this reply.

    You may need to login

    OR

    Buy either a Membership or valid license for this product.

    Thanks, Team GeoDirectory!

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount