Deleting an anonymous vote deletes ALL anon votes.
The functionality to unset votes for a given user AND hostname is missing from drupal so it deletes all anon votes (uid=0).
For reference I'm attaching my (patched) votingapi.module (for 4.7) that fixes this behaviour. It also includes the hostname fix that helps with anonymous voting.

CommentFileSizeAuthor
#4 votingapi_5.patch47.46 KBcoreb
#3 votingapi_4.patch4.81 KBcoreb
votingapi.module.txt27.18 KBdiab303

Comments

hickory’s picture

Project: jRating » Voting API
Category: bug » feature

Moving this to VotingAPI as it's presumably generally applicable.

hickory’s picture

diab303: could you post an actual patch?

coreb’s picture

Status: Active » Needs review
StatusFileSize
new4.81 KB

diff take against latest in the 4.7x branch.

coreb’s picture

StatusFileSize
new47.46 KB

diff taken against latest in 5.x branch.

Extra info in case the patches don't apply cleanly: I took the diff by copying the modified version over the cvs version, then running "cvs diff -up votingapi.module" from the votingapi directory. I haven't created many patches, so I don't know if I'm doing everything right.

eaton’s picture

Status: Needs review » Fixed

The 4.x and 5.x branches are no longer supported -- the bug, though, is fixed in newer versions of the API.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.