Hi,
Just performed the 5.x.1.15 update and the static widget showing the average vote is only showing 5 blank stars regardless of whether any votes have been cast on a node.
If i revert to the 5.x.1.13 version of the fivestar_static function it works fine.
I'll take a closer look over the weekend and if i get a fix i'll post a patch.
Thanks
Tom
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | fivestar_static_display_5.patch | 796 bytes | quicksketch |
Comments
Comment #1
quicksketchThanks, it looks like this is specific to the Drupal 5 version. I can reproduce it easily there, but D6 is working fine.
Comment #2
jkocsis commentedI'm experiencing the same problem with Drupal 5 and rely on the static widget with the average vote quite heavily. So if a fix could be found I'd be very grateful.
Comment #3
jkocsis commentedI've looked at this a bit and I believe the problem lies in how the fivestar_static function is being called from within the fivestar_nodeapi function. fivestar_static used to be defined as fivestar_static($content_type, $content_id, $node_type = NULL). 5.x-1.15 changed the definition to fivestar_static($content_type, $content_id, $tag = 'vote', $node_type = NULL). A call to fivestar_static is made in fivestar_nodeapi and passes NULL to $tag. $tag is thus assigned a legitimate value of NULL and 'vote' doesn't get assigned to it.
A call to votingapi_get_voting_result inside fivestar_static is made and this has changed slightly in 5.x-1.15 as well. Instead of 'vote' being hardcoded inside the call, the variable $tag is now being used. However, $tag contains NULL instead of 'vote' and so votingapi_get_voting_result doesn't return the proper value.
When 'vote' is properly assigned to $tag, then everything seems to work normally.
Comment #4
hydrian commentedI am also experiencing this issue. I am also using D5.
Comment #5
dmuth commentedI am seeing this as well.
Comment #6
blueminds commentedSame problem here, however on D6. After downgrade to version 1.13 it works again, so this bug affects 1.15 as well as 1.14.
Comment #7
hydrian commentedThe problem is that 1.14 was a security patch and bug fix. So rolling back to 1.13 is not really on option on most sites.
Comment #8
blueminds commentedYes, I agree. I just provided the info to clear out in which version the feature worked. However I am not using the 1.13 version on production.
Comment #9
Poieo commentedSubscribing...same problem.
Comment #10
c-c-m commentedSame problem with D5
Comment #11
quicksketchThis patch corrects this problem, which has been committed to the D5 branch.