VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: ClaudioRomeo on November 29, 2016, 18:36:42 PM

Title: [Solved] Reviews present in BE ande in FE but not in the DB
Post by: ClaudioRomeo on November 29, 2016, 18:36:42 PM
J 3.6.4
VM 3.0.18
PHP 5.5.37

There are three strange things that are driving me crazy.

#1. There is a review reported both in BE (the one at the top in image BackEnd.jpg) and in the FE, but not present in the DB (see Ratings.jpg, Ratings_Reviews.jpg and Ratings_Votes.jpg). So: where is the review/vote stored?

#2. Two of the reviews seem to be duplicated, even if with times slightly different. In each of them, one seems to refer to vote, the other one to review, so I need to have them both published for having the product page displayed correctly.

#3. As you can see from the dumps of the DB tables, some data appear strange:
NULL in Ratings_Reviews virtuemart_rating_vote_id
Blank in Ratings_Reviews customer
0 in Ratings rates
It makes me think the DB is corrupted or something similar. Am I right?

Can someone clear #1 and #2 to me?
If my DB is really corrupted, how can I fix it?
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: lindapowers on November 29, 2016, 21:13:36 PM
Hi I was going to ask the same thing cause I went crazy searching for reviews in phpmyadmin but didnt find the table for the reviews.

Using 3.0.18.5
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: Studio 42 on November 30, 2016, 00:32:44 AM
YOu have 3 table
__virtuemart_ratings
__virtuemart_rating_reviews
__virtuemart_rating_votes
__virtuemart_ratings is the main (cumulated) rating for a product, rating_reviews have the review and rating_votes the votes associate to a review id.
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: ClaudioRomeo on November 30, 2016, 08:33:52 AM
Thank you, Studio 42.
This is exactly what I said. But, as you can see from the attached pictures, now it seems that new reviews don't appear in none of the DB tables, even if they are reported both in FE and in BE.
So, where are they stored?
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: Studio 42 on November 30, 2016, 13:04:36 PM
Perhaps you don't checked the right DB, but a copy of it ?
I say you that because i had a day the same problem, the db was the copy for a stagin server
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: ClaudioRomeo on November 30, 2016, 14:23:58 PM
Ehmm...  :-[
I don't know how to tell you, but... you are RIGHT!
I asked my hoster to restore the DB after some experiments, and he duplicated the DB, updating the reference in the Joomla site.
Two tons of Valium wasted!  >:( :D
Thank you again, Studio 42.

Any suggestion about the strange data in the DB? Should I correct them by hand?
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: Studio 42 on November 30, 2016, 14:55:36 PM
If you have only a review then vote id is  null for this review(eg. adding a review from back-end)
And same if you have only a vote and no reviews
Title: Re: Reviews present in BE ande in FE but not in the DB
Post by: ClaudioRomeo on November 30, 2016, 16:51:26 PM
OK. It seems to me strange, since I never added a review from the BE (I don't know if it is really possible).
But the main thing is that the NULL value is not a DB corruption.

Now I have a more specific question, but I will open another discussion.

Thank you very much.
Title: Re: [Solved] Reviews present in BE ande in FE but not in the DB
Post by: lindapowers on November 30, 2016, 23:20:14 PM
Quote from: Studio 42 on November 30, 2016, 00:32:44 AM
YOu have 3 table
__virtuemart_ratings
__virtuemart_rating_reviews
__virtuemart_rating_votes
__virtuemart_ratings is the main (cumulated) rating for a product, rating_reviews have the review and rating_votes the votes associate to a review id.

Oh lord, had it in the second page of PHPmyadmin, thanks Patrick!