Closed (works as designed)
Project:
Fivestar
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Aug 2011 at 10:21 UTC
Updated:
20 Feb 2014 at 07:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
iajay commentedsubscribe
Comment #2
alonk27 commentedsubscribe
Comment #3
Toxid commentedI've Identified the function where the numbers are supposed to come from. In fivestar.field.inc line 347 there's a function called fivestar_field_formatter_view. At line 376 it calls drupal_get_form('fivestar_custom_widget', $values, $settings);. If the user doesn't have rate content permission, the drupal_get_form isn't called and therefore no rating value is loaded.
That's how far I got, but I'm not very familiar with the theme functions so I don't know how to make a static display.
Comment #4
jm.federico commentedThe solution to this problem is to add
in line 386, just before the return.
Comment #5
jm.federico commentedattachign patch
Comment #6
alonk27 commentedWorks!!! Thanks!!!
Comment #7
Toxid commentedGreat! Now it's just the matter of getting the text to show as well. I tried to add this code just before the closing tag:
It generates the right output, but I think I placed it in the wrong key. Unfortunately I can't seem to find the right one. The authenticated fivestar form uses that key so I thought it would be right.
Comment #8
ericduran commentedtagging
Comment #9
mjpa commentedThis issue appears to be fixed in the -dev release as of today (and I guess the alpha1 release).
However, the value displayed is different depending on if you have the rate content permission or not.
The average vote for a node I have is 66.667. With the rate content permission, I see 4/5 stars - which is wrong. Without the rate content permission, I see 3 and a bit stars - which is correct.
Comment #10
whiteph commentedSee Widget Stars Not Displaying Fractional Ratings (Rounding Up) comment #2.