Closed (fixed)
Project:
Rate
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Oct 2011 at 19:18 UTC
Updated:
23 Aug 2012 at 12:40 UTC
I've enabled star rating on a field in a custom content type, and selected the "10 stars" option. Everything else works fine, except when a user rates something as 10 stars, it is registered as only 1 star (the star rating that shows up on the page displays the exact same thing a one-star rating would show -- one filled-in star and nine gray ones). Help would be very much appreciated.
Comments
Comment #1
Threesa commentedI'm having the very same issue!
Comment #2
aacraig commentedI have the same problem with a five star widget, though the result is the same no matter which star I vote on. The result is always that I voted one star.
From a brief look in rate_vote_ahah() and printing out watchdog messages, it looks like the option passed on line 673 of rate.module is always the same, regardless of the star that's been clicked on:
Comment #3
Stormen1 commentedI had the same problem, but found out what I did wrong. I had enabled the options, not the percentage for the fivestar widget. So when I voted the 5 star, it gave me a five (5) vote. BUT voting API and the fivestar widget is made for 1-100. And if the node has a rating of 1-20 it displays one star, 21-40 two stars and so on. Therefore I was always told I voted 1 star, because I always voted <20.
How to bypass this problem I have no idea. In views, you maybe could somehow divide the result by 20 to display as a number and not the complete widget. But then the problem comes that you can't use math or php inside the rewrite result. (Views 3.) Any other idea?
Comment #4
basirmukhtar commentedI found the solution. actually module is working fine. and stormen1 you are right the problem is same.
So, here is the solution,
when you are adding options you fill value field just give it some value according to the number of your total options like i want to add 10 options so i give value 10 to my first option then for second its 10+(previous value) and same goes for all the others and at the end for 10th value i will fill 100 in value field.
Hope this will help you.
Thanks :)
Comment #5
thaistore commenteduhh
Comment #6
mauritsl commentedFivestar work indeed with percentages. Use the value 10 for the first star and 100 for the last.
Comment #7
BenjaminRH commentedYep, that was it, thanks.