fivestar only save one vote

ytt - July 5, 2009 - 06:03
Project:Fivestar
Version:6.x-1.17
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Firstly, I'd like to thank you for this great module.

I've found a problem while implementing a fivestar-vote on my nodes.

My situation:
drupal 6.13 => clean default install
fivestar 6.x-2.17
votingapi 6.x-2.1

and, NO any other contribute module.

I enabled fivestart for the default content type "story", and then the fivestar shows up, it's cool.
And then I added a user "test1", and configured the permission that "test1" can vote now.

Then the problems came out, fivestar can only save the "admin" vote.
I use the "admin" user in Firefox, and use the "test1" in IE.( because I want to avoid a cookie conflict ? )
I use "test1" to vote, is shows "saving your vote", and then "your vote have been saved", and then "Your rating: 2 Average: 2 (1 vote)". But after I reload the page, my vote disappeared...The text under the stars is "Your rating: None Average: 2 (1 vote)", but the star is still 2 star, that is right.

I've tried several times, every user can vote correctly, but only the display of "admin" is right.
And, only the last vote value is saved.

Is anybody know something about this? Thanks!

AttachmentSize
1.JPG3.42 KB

#1

truelove-nl - July 5, 2009 - 21:18

Similar problem here. All new votes are stored in the database with uid=1.
Same configuration.
Problem appeared after update to fivestar 6.x-2.17

#2

splint - July 6, 2009 - 04:35

exact same problem here.

#3

splint - July 6, 2009 - 05:20

just installed 6.x-2.x-dev and it fixed the problem.

#4

ytt - July 6, 2009 - 06:44

do you mean this is a bug of votingapi?

#5

kidrobot - July 6, 2009 - 18:10

Changing line 701 of fivestar.module to the following works for me.

<?php
_fivestar_cast_vote
($type, $cid, $value, $tag, NULL, TRUE);
?>

#6

Abbademdon - July 6, 2009 - 18:45

Seemed it was always setting the current uid to a TRUE value...?

#7

duozersk - July 6, 2009 - 21:23

it seems to me that it always records a vote from the uid=1...

| 1144 | node | 2865 | 20 | percent | vote | 1 | 1246635288 | 24.6.228.37 |
| 1160 | node | 2865 | 80 | percent | vote | 1 | 1246714429 | 91.188.6.113 |
| 1187 | node | 2865 | 100 | percent | vote | 1 | 1246915371 | 89.178.157.86 |

#8

duozersk - July 6, 2009 - 21:39

fix from #5 helps to fix the issue... don't have skills to validate if it is the fully qualified fix that will not cause other issues.

#9

quicksketch - July 7, 2009 - 03:38
Status:active» fixed

kidrobot nailed it in #5. Apologies for all the breakage. I've committed his suggested change and I'll roll a new release immediately.

AttachmentSize
fivestar_single_vote.patch 606 bytes

#10

chilledoutbeardedman - July 7, 2009 - 07:11

Thanks. Works great.

#11

System Message - July 21, 2009 - 07:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.