In the 7.x-2.x branch, only one anonymous user can vote per entity, regardless of the user's IP or the settings for votingapi_anonymous_window. That's because the function _fivestar_allow_vote doesn't pass the IP as criterion to votingapi_select_votes for anonymous users. I've attached a patch with a fix for this bug.

Comments

hver’s picture

Status: Active » Needs review

Updating issue status for automatic testing.

Status: Needs review » Needs work

The last submitted patch, anonymous-revote.patch, failed testing.

eeg’s picture

StatusFileSize
new238 bytes

Same patch again, this time it should be applicable (hopefully).

eeg’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 3: fivestar-anonymous_revote-2498161-3.patch, failed testing.

eeg’s picture

Status: Needs work » Needs review
StatusFileSize
new584 bytes

Something went wrong when I've created the patch and I didn't check it before uploading it. So lets go for another try.

eeg’s picture

Component: Documentation » Code
pieterdc’s picture

I agree 1 allowed anonymous vote per IP address is better than 1 allowed anonymous vote overall. But it still doesn't cut the mustard. I suggest to collaborate on #798790: Option for anonymous votes to use session id in vote_source field to allow 1 anonymous vote per anonymous user session.

dbt102’s picture

Status: Needs review » Needs work
cosolom’s picture

Status: Needs work » Needs review
StatusFileSize
new1.37 KB

I think that your decision about user IP is wrong. You can see problem when anonymous comments published by moderator. And in this case your patch will fail because user is logged in (moderator) but comment still for anonymous user and you rewrite user ip with moderator ip. I propose this patch, but have no possibility test all cases, so i think that this patch is not final. But it work with postmoderate comments and with edited comments

lubwn’s picture

Patch in #10 works perfectly! Thank you very much!

pifagor’s picture

StatusFileSize
new1.57 KB

The problem is that the wrong ones define the user ID. Here is a patch that should fix this problem