Anonymous users can't vote on content. They have the permission to vote and all worked just fine before performing update to drupal 6.11 from 6.10 and update of fivestar 6.x-1.13 -> 6.x-1.15.
If Javascript is enabled - then it shows that the vote was saved, but doesn't update the Average. It was updating the Average right away after the vote was cast with 6.x-1.13. After refreshing the page it looks like the vote wasn't cast at all.
If Javascript is disabled - it saves the vote and updates the Average, but after refreshing the page it looks like the vote wasn't cast.
In the same time it works without any issue for logged in users.
Comments
Comment #1
quicksketchI think there are several things misleading about this report. I don't think there's any difference in behavior between 1.13 and 1.15, I think you're just describing the normal behavior of Fivestar (for all versions).
Regarding anonymous users and refereshing the page, this is true that the user's vote will be lost after reloading the page. This is the normal behavior of Fivestar because show an anonymous user's vote would not work with page caching, since the same page is shown to all anonymous users.
However, it does seem that there is some problem on your site that anonymous votes aren't saving. I'm not seeing this problem on my own sites. Did you run update.php after upgrading?
Comment #2
duozerskHi Nate, thank you so much for your time on this issue.
I'm really sorry, I got it wrong the first time. Your post above helped me to look into the right direction.
The votes are actually being saved, be it for Anonymous or Authenticated users, no issues with it. I checked it by casting votes and seeing this node as a logged in user.
The only concern now is that it doesn't auto-magically update the Average score immediately after the vote is cast as it was doing previously (I bet it was doing it). I did run the update.php script and it was successful without any errors.
Let's take the logged in user:
- If Javascript is enabled - the vote is cast, the Average is not updated. After I refresh the page - my vote is saved and shown, and the Average is updated.
- If Javascript is disabled - then you have this drop-down for your vote and the "Rate" button - and right after you press this "Rate" button the Average is updated.
Not a big issue though - just strange to see this difference between enabled/disabled Javascript. The Average score not being updated - this is what lead me to think that the votes are not being saved.
Comment #3
zmetzner commentedHello. I am not sure if this is expected behavior, but thought I would mention in this thread...
When I go to my site as an anonymous user, and rate a piece of content, I see "Saving your vote..." That text just stays there until I refresh or come back to the page. And when I come back to the page, the vote count, and average vote remain unchanged. Is this expected behavior? Thanks for any feedback you can provide!
Comment #4
duozerskzmetzner - not sure... basically, due to Drupal page caching you shouldn't be able to see the updated Average and your score (when you are anonymous) right away after the vote has been cast. But after clearing the page cache you should see the updated score. What is strange in your case is that it constantly says "Saving your vote...". In my case for anonymous user (the same is for the logged in user) it changes in one/two seconds to say "Your vote has been saved." and then "Your rating: 4". You can try to see the same node as the authenticated user in another browser to check on if the vote is saved or not; another way to approach this is to check the votes directly in the database (if you are familiar with SQL).
quicksketch - can you please clarify on the issue with the Average not being updated when the vote is cast? This behavior is the same for anonymous and authenticated users.
Comment #5
quicksketchThe problem of anonymous users' votes not counting or being saved is solved in #481640: Problem with page cache and token - anonymous users can't vote with page caching.