Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The stars are not outputting in my nodes. Using 'as stars', 'rating' and 'percentage' does not output any data other than the field's label.
Checking out the node's render with devel, I can see ['field_NAME']['#markup'] as just the integer (60, 80, 100), perhaps something is wrong with a theming function?
Comments
Comment #1
bsuttis CreditAttribution: bsuttis commentedSome observations so far:
foreach ($element['#items'] as $delta => $item)
..., no?Comment #2
bsuttis CreditAttribution: bsuttis commentedI've made some progress. I rewrote
fivestar_field_formatter_view
as follows, I haven't addressed the other 2 formats (rating, percentage) yet.Not sure if $item['target'] is necessary as the $variables in the theme function are rating, stars, and tag. No patch sorry, let me know if this is the way to proceed, ratings display as stars in nodes and views now.
Comment #3
ezra-g CreditAttribution: ezra-g commentedJust a heads up, this might be related to http://drupal.org/node/786224#comment-4049938 .
Comment #4
ericduran CreditAttribution: ericduran commentedHey,
A couple of questions, are you using the latest dev?
How are you trying to display the stars?
Are you setting up the stars for user voting? Or as a field?
Are you using views for display?
Thanks :)
Comment #5
davidthornley CreditAttribution: davidthornley commentedHi,
I am seeing this issue as well. I have tried with the latest dev snapshot. Using above patch does not help either. With this patch I nolonger see the labels for my fivestar fields.
Let me know if more information would help.
Comment #6
bsuttis CreditAttribution: bsuttis commenteddavidthornley, on node display (i.e. node/1) labels output for me, however they are gone on the node/1/edit. I believe a different function (theme_fivestar_widget) controls the output on node/1/edit though, the classes are different and it makes sense to me, since the stars aren't static on node edit.
ericduran,
- Latest dev as of approx the time I posted -- 7.x-2.x-dev
- Displaying the stars: at node display (node/1) and as fields in Views
- As a field, it's the Fivestar rating field that is set at node creation
- Yes, views is used
Comment #7
bsuttis CreditAttribution: bsuttis commentedCan't seem to find an actual theme function that controls the widget on node edit (i.e. node/1/edit).
Seems fivestar_expand() is where it's outputting from right now. Doesn't appear to have a '#theme' override.
My fivestar.module:
// $Id: fivestar.module,v 1.42 2011/02/01 17:15:07 ericduran Exp $
The latest dev seems is be omitting that line.
Comment #8
ericduran CreditAttribution: ericduran commented@bsuttis, Ok so you're using views to display the fivestar widget.
I'm going to closed this issue as a duplicate of http://drupal.org/node/1047664 because is a bit more clear as to what the actual issue is and is older.
Sorry for the views functionality not being ported yet. It will be completed soon but for now the widgets should be working if you use the regular displays options.
Thanks.
Comment #9
ericduran CreditAttribution: ericduran commentedwoops, the views threw me off, this is it's on issue. Fixing now....
Comment #10
ericduran CreditAttribution: ericduran commentedNow this issue of the fivestar field stars not being display on the node is fixed. -- http://drupal.org/commitlog/commit/2490/796b3c5609706f18b98be67d75bd5a7c...