Hi,

when you vote with 1 out of 5 stars the vote is saved correctly in the database (average vote fits) but there aren't displayed any red stars. There are only five pale stars.

thx

Comments

vm’s picture

I can confirm this bug see it at demo.verymisunderstood.com/drupal5 3rd node on the front page.

vm’s picture

further information;

upon choosing 1 star it works as expected;
it is not until a page refresh that the star returns to its unchosen state.

Crashtest’s picture

Status: Active » Needs review
StatusFileSize
new1.46 KB

Gotcha.

There is a bug in the fivestar_expand function. If it isn't allowed to clear the vote and the rating has a value smaller the 21 percent no radiobox will be checked.

I fixed it, but maybe there is a more elegant solution. Please see yourself.

thx

vm’s picture

tested & confirmed that this patch has indeed fixed the issue.

vm’s picture

Priority: Normal » Critical

marking this as critical as the expected behavior isn't achieved.

vm’s picture

^^^ claifiying above comment.

expected behavior isn't achived previous to patch being applied.

quicksketch’s picture

Could you reroll against the latest 5.x and make sure to use two spaces instead of tabs in the patch?

quicksketch’s picture

Status: Needs review » Needs work
Crashtest’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.31 KB

Here you are. Hope this is better.

vm’s picture

the last patch is missing one of the changes from the first patch

-    if ($element['#default_value'] > $this_value && $element['#default_value'] <= $next_value) {
+	if ($element['#default_value'] > $this_value && $element['#default_value'] <= $next_value) {
vm’s picture

nevermind: now that I actually read it, I can see its not changing anything.

KentBye’s picture

StatusFileSize
new1.38 KB

+1 on Crashtest's patch as it fixes this bug.
Not sure if it makes a difference, but I rerolled Crashtest's patch against the latest 1.2.2.11 version.

Crashtest’s picture

thx. I just recognized that I've checked out the Main-branch. So the lines didn't fit.

Leeteq’s picture

The datestamp for v1.5 is the same as the date for this patch. Did this one make it into 1.5? If so, then this issue should be closed.

Leeteq’s picture

- and if not, the version number for this issue should be updated.

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

No this hadn't gotten in yet. I've committed and will release 1.6 shortly. Thanks Crashtest and KentBye!

Anonymous’s picture

Status: Fixed » Closed (fixed)