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.