Closed (fixed)
Project:
Fivestar
Version:
6.x-1.19
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2009 at 13:41 UTC
Updated:
19 Jul 2010 at 01:52 UTC
I'm having the issue with 6x 1.19 where I delete a comment rating and the widget still considers that vote in the average. For example, a spammer give a 1 star rating on a node with no other ratings. I delete the comment and the spammer user, and the widget still shows a 1 star average even though there's no ratings for it. How can I remove that from the database?
Thanks for any assistance!
Dan
Comments
Comment #1
AgentD commentedOk, really need to fix this. Deleted a bunch of spam and now some nodes still have the votes associated with what was deleted.
If someone can detail what I need to do to remove votes from the database I will pay $20 via paypal.
Thanks!
Dan
Comment #2
kevin p davison commentedFigure this out yet? I simply need to remove votes, and start from scratch. Perhaps this requires deleting DB tables?
Comment #3
ezra-g commentedThe "most correct" way to do this would be with votingapi_delete_votes() function, after having selected the problematic votes in question. However, you can DELETE FROM {votingapi_vote} WHERE (criteria for the votes you want to delete) and then recalculate the vote totals (or just delete from votingapi_cache for the affected content_id and wait for the votingapi to recalculate for you).
Comment #4
AgentD commentedIf I knew sql functions I bet this would answer it :)
Can you give some details on how to identify the votes to delete, then how to do that in phpmyadmin?
Or how to delete the votingapi_cache if that would do it?
I'm happy to send the $20 if I can do it!
Thanks,
Dan
Comment #6
AgentD commentedNot fixed - I don't understand how to implement ezra-g's response. For details on how to do this I'll send the $20 happily.
Dan
Comment #7
AgentD commentedComment #8
johnsnowsyh commentedGo to your hosting website, go to the corresponding database of your drupal site, select "edit with phpmyadmin", then login using your databse login and pwd if you still remember them.
then select the votingapi_vote or votingapi_cache table from the left pane; there's a tab "SQL" on the right pane, click it, do your sql query, and click "Go" on the right lower corner.
if you have any questions, you can email me at johnsnowsyh At Gmail.com.
if you feel your problem is solved , I want my $20 to be donated it to any of the Haiti earthquake relief funds(you can do it thru paypal), thank you.
Comment #9
AgentD commentedUPDATE
johnsnowsyh was extremely helpful and I was able to correct the problem with his almost immediate email replies.
Since he helped a great deal and asked for nothing for himself in return, and instead for a donation to a Haiti earthquake relief fund, I have doubled my bounty to $40 and have donated it to http://yele.org/
We could use more people like johnsnowsyh
Dan
Comment #10
AgentD commentedComment #12
Exploratus commentedI don't mean to sound like a complainer, but I think it's pretty silly that one needs to go to the DB to erase a vote. Overall, there should be a system within Fivestar preferrably a tab within the node, that shows all the votes and who casted them for a specific node. This page would also allow one to delete any votes and make sure that everything is right.
Right now the vote system delivers results without anyway of being able to verify the accuracy within Druapal. One should be able to see what users and what people are leaving the votes behin just like one can see that with comments.
Wish I had the programming skills to do this.. Just my two cents.