Closed (won't fix)
Project:
Voting API
Version:
5.x-1.6
Component:
Miscellaneous
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Aug 2011 at 21:52 UTC
Updated:
3 Feb 2013 at 15:47 UTC
I have had this installation for over 3 years with no errors until now. I have repaired the database and run cron jobs.
However I get this message when voting on content...
user warning: Duplicate entry '70603' for key 'PRIMARY' query: INSERT INTO votingapi_vote (vote_id, content_type, content_id, value, value_type, tag, uid, timestamp, hostname) VALUES (70603, 'node', 4156, 70, 'percent', 'vote', 1, 1312920525, 'myip') in /home/myname/public_html/mysite/includes/database.mysql.inc on line 172.
No new votes get saved. Anyone have any ideas on what to do? I would hate to remove the voting feature from the site and would love to fix this.
Comments
Comment #1
eaton commentedDrupal 5 actually used a 'sequences' table that stored a list of IDs for each table; if a vote somehow got inserted without that table being incremented properly, it will keep trying to insert records with duplicate ID numbers. Try running the following SQL in your database:
UPDATE sequences SET (id = id +5) WHERE name = 'votingapi_vote';That should bump the list of id numbers up a few spaces and hopefully fix the problem. If not, I'm at a bit of a loss how that got messed up...
Comment #2
neobodhi commentedThis probably happened a week or more ago and there has probably been a few hundred votes or so since then, would that make a difference to the "id = id +5"?
Also, do I just copy and paste "UPDATE sequences SET (id = id +5) WHERE name = 'votingapi_vote';"
In the phpmyadmin for the votingapi_vote database under the sql tab and press update? I have never done anything like this before so I apologize for my ignorance.
Comment #3
duaelfrThis version of Voting API is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.