When using fivestar + views there is a small bug in fivestar_views_widget_handler function , on the generated view there are always 5 stars and there is no way to set this up.

As i noticed you can set up amount of stars displayed for each content type on /admin/content/types but this variable is not properly received in fivestar_views_widget_handler :

$node_type = isset($columns->node_type) ? $query->node_type : db_result(db_query("SELECT type FROM {node} WHERE nid = %d", $columns->nid));

$node_type is empty because $columns->node_type isset but $query->node_type not.

I'm attaching patch to this post.

Greetings everyone.
Mac
Meant4.pl Web Studio
http://www.meant4.pl
maciej.perlinski@meant4.com

CommentFileSizeAuthor
fivestar.patch656 bytesmac_perlinski

Comments

mac_perlinski’s picture

Title: Fivestar widget + Views bug (not showing proper amount of stars it shows always 5 stars) » Fivestar widget + Views bug (not showing proper amount of stars)
mac_perlinski’s picture

Status: Fixed » Needs review
mac_perlinski’s picture

Status: Needs review » Fixed
quicksketch’s picture

Status: Fixed » Needs review

Heh, some kind of status funkiness going on here. Thanks for the patch, I'll take a look at it.

mac_perlinski’s picture

Lol, my fault but anyway i m pretty sure it will solve at least this small problem, if you need more detailed description of the situation when it exists please write back.

Mac

quicksketch’s picture

Status: Needs review » Closed (duplicate)

This has already been fixed in CVS. #252914: Check "rate content" permission in views