Closed (fixed)
Project:
Voting API
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2008 at 20:54 UTC
Updated:
4 Jun 2018 at 15:36 UTC
Jump to comment: Most recent
Ive been testing my site and am about ready to set it live, but I need to reset all of the votes... how do I do this?!?!?
Comments
Comment #1
eaton commentedThere's no built-in feature for vote resetting, but running the SQL queries:
TRUNCATE votingapi_vote;
TRUNCATE votingapi_cache;
will clear out all of the vote data. Good luck!
Comment #2
dergachev commentedThanks, that's just what I came here to confirm.
But this brings up a question: why doesn't voting API expose an admin page that allows basic functionality like this?
No matter what voting widget one might use, having a simple way to manage votes is necessary.
And if Voting API is purposely limited, is there a basic "admin votes per node" module that everyone's using?
Comment #3
Doronro commentedhi,
this is quite an old thread. is this still the best way to go about it?
how can i run those commands? i've yet to install drush on my site as i feel it's a bit out of my league. is there a module that allows to run such commands from within the interface?
many thanks for any info.
ps i tried the dba module but it gives me an error so i'm looking for another way..
Comment #4
Doronro commentedin case any other beginners stumble upon this issue, i ended up doing it with phpMyAdmin through cPanel on my hosting company...
Comment #5
Anonymous (not verified) commentedEven with Doronro's comments I was unsure of what to do.
Through phpMyAdmin I went to the two tables below that were found in my database.
votingapi_vote;
votingapi_cache;
For each one I clicked "select all items" and then deleted them all.
That's it.
I double checked my database's integrity by having cPanel do a check. It says it's ok.
I flushed the Drupal cache.
All of the stars, for all of my items you can vote for were returned to zero.
Maybe someone else could chime in that this is the correct way to do it, but it seems to have worked for me.
Comment #6
rishi.kulshreshthaYou can do this in your module or via devel/php
Comment #7
jwineichen commentedvery helpful; thanks @rishi for documenting this