Closed (fixed)
Project:
Plus 1
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
13 Jul 2011 at 14:08 UTC
Updated:
30 Jul 2013 at 14:59 UTC
Jump to comment: Most recent file
Hi, have installed plus1 7.x.-1.x
gr8 module btw!
But having problems with guest's voting.. the button is showing up but noting happens when clicked.
// TB
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | enable-anon-voting-1217670-7.patch | 1.2 KB | guldi |
Comments
Comment #1
gabidrg commentedThe issue comes from several drupal_valid_token() function calls in plus1.module, for anonymous users a third parameter has to be supplied aka $skip_anonymous = TRUE, see below:
Comment #2
Dimmduh commentedAlso for next function - plus1_undo_vote:
Comment #3
falbertin commentedGreat idea, but flawed: After implementing the above change, anonymous users can vote as many times as they want. Not the intent of the module, I think. ;)
Would there be a way of preventing double voting? Thanks!
Comment #4
steven jones commentedPlus1 would need to leverage the http://drupal.org/project/session_api module I think.
Comment #5
guldi commentedI need this module and the bug must be fixed.
I don't think session_api is needed here.
Getting back when I'm done.
Comment #6
guldi commentedComment #7
guldi commentedOk, for what I see, #1 and #2 would do the trick. If you want to prevent guests from excessive voting, you have to configure the voting-api (admin/config/search/votingapi) with the option "Anonymous vote rollover".
When set to 'never', your guest won't be able to revote from the same ip-address. If you choose '15 minutes', the guest will be able to revote for the same content after 15 minutes.
I suggest the maintainers of the module to commit the two changes suggested in comment #1 and #2.
Comment #8
guldi commentedHere's the patch for my suggestion #7.
Comment #9
rowbeast commentedJust tested out the patch in #8 and agree with #3, anon voters can now vote, however it does not respect the value settings from Voting API. Anon voters can vote unlimited times immediately. Renders the patch useless sadly. Happy to test any further patches as well.
Comment #10
davident commentedConfirming the above vote breaks time based vote rollover rules in the Voting API, essentially making it a non-starter.
Anyone have a fix yet? It appears the maintainer isn't active.
Comment #11
davident commentedI have found a fix to this problem. The following will allow anonymous voting with timed rollover.
1.) Apply the patch in this thread that turns on anonymous voting (#7)
2.) Apply the patch following patch to VotingAPI http://drupal.org/node/997092#comment-4867370
The problem seems to lie in both modules, not just Plus1.
Comment #12
amitavroy commentedThe module is nice but the only issue is the same not able to vote as anonymous user and I guess that is the reason the vote was set before any check of whether a vote is already set or not.
Waiting for the functionality :)
I was trying that on one of my modules which I have not posted here but on my site http://www.amitavroy.com/justread/content/articles/ajax-and-dislike-usin... but I am not able to check for the IP.
Comment #13
rogical commentedVoting api is supporting anonymous well now, patch at #8 works fine.
This patch is going to be committed if no more issue.
Comment #14
rogical commentedCommitted
Comment #16
kladix commentedSolution #7 works! Thanks a lot!