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

Files: 
CommentFileSizeAuthor
#11 fivestar_static_display_5.patch796 bytesquicksketch

Comments

Thanks, it looks like this is specific to the Drupal 5 version. I can reproduce it easily there, but D6 is working fine.

I'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.

I'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.

I am also experiencing this issue. I am also using D5.

I am seeing this as well.

Same 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.

The 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.

Yes, 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.

Subscribing...same problem.

Same problem with D5

Status:Active» Fixed
StatusFileSize
new796 bytes

This patch corrects this problem, which has been committed to the D5 branch.

Status:Fixed» Closed (fixed)

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