Active
Project:
jRating
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2007 at 21:40 UTC
Updated:
27 Nov 2007 at 17:44 UTC
Even though I allowed anonymous votes in the permissions, those users are not allowed to vote.
Comments
Comment #1
momper commentedhello
the same at my site - or is it a wrong configuration?
thanks and greetings momper
Comment #2
hickory commentedWhat error do you get?
Comment #3
justinchev commentedI get a similar error when allowing anonymous users to vote via the Access Control. The star rating system shows up but when the anon user selects their star rating it comes up with an error saying they need to register or log in.
Strange thing is the jRating area in Access Control doesn't have any check boxes, but I have set the FiveStar Module to allow Anonymous voting.
See http://www.rankster.co.uk (website currently only set for registered users due to this prob)
Comment #4
justinchev commentedJust had a quick tinker and this change seems to work. (Not sure what greater repercussions may be so do at your own risk)
In the file 'jrating.module' I changed the line:
if ($user->uid && user_access('rate content'))
to:
if (user_access('rate content'))
It now allows anonymous users to vote and seems to remember their vote (I presume by IP or something) - though at this stage I'm not sure on the 'vote again' time frame or anything...
Comment #5
justinchev commentedDISREGARD THE ABOVE
Stupid, stupid, stupid - posted the above without thinking it through. The change above allows an Anonymous user to post, but the anonymous profile then only counts as one user. ie only one vote.
Comment #6
deezer commentedI have same problem. How to solve it?
Comment #7
hickory commentedDid you all allow anonymous users to rate content in the jRating section of the Access control page?
If so, and there's still a problem, please describe the error in more detail so I can try and fix it.
Comment #8
justinchev commentedOk not sure how I was getting the error, might have had something to do with the 5star module which I have now switched off. The issue now is...
When you allow anonymous users to vote by setting it via the Access control, an anonymous user can then vote (anon vote1). The problem is that if a second anonymous user then views the item it already registers that there is a vote (as recorded by anon vote1).
If the second anonymous user then casts a vote it just overwrites the 'anon vote1' and still counts it as only 1 vote. It doesn't give the second anonymous user a blank vote.
If you view this link you will see what I mean with the top item already having an anonymous vote cast, where it should be blank for the new anonymous user. http://www.rankster.co.uk/arts-crafts
Comment #9
hickory commentedjustinchev: Anonymous users are counted as the same person if they come from the same IP address within 24hr. Is what you're seeing incompatible with that?
Does the second anonymous user see the first anonymous user's actual rating, or just that there's been a vote? (which there has, so you'd expect that)
Comment #10
justinchev commentedThe second anonymous user I tested with was coming from a different IP - see this link (http://www.rankster.co.uk/arts-crafts) The top item will already have a vote cast for anon users.
Comment #11
hickory commentedThat's strange. The actual code is
Could you look in the database and see what values have been stored in the votingapi_vote table for the anonymous votes on that item?
Comment #12
justinchev commentedOne quick thing... I have just noticed in the jRating configuration I had everything set to YES apart from the 'Display rating form for anonymous users' which was set to NO. Should it still be showing? Have now changed this to YES, not sure if that will make a difference.
Will try and check what is in the database, not my area of expertise so holding thumbs...
Another thing is I am using 5.x-1.x-dev, should I update this as it may be something to do with that?
Comment #13
hickory commentedAs long as you have the -dev version from today (yesterday's might be ok too) it should be alright - it's automatically packaged from CVS daily.
If you're allowing anonymous users to vote then the form will be shown regardless of the other option, which is for displaying the form even when anonymous users aren't allowed to vote (it gives the 'login or register' message when they try and vote).
Comment #14
justinchev commentedJust looked in the database for that item and there are fields for vote_id, content_type, content_id, value, value_type, tag, uid, timestamp, hostname - not seeing any reference for anonymous.
Comment #15
hickory commentedThere will be some votes stored in that table with content_id = 479. At least one of them should have uid = 0.
Comment #16
justinchev commentedYeap there is one with a uid = 0.