Download & Extend

Empty Fivestar elements do not update with user's vote after voting

Project:Fivestar
Version:6.x-1.13
Component:Code
Category:bug report
Priority:normal
Assigned:quicksketch
Status:closed (fixed)

Issue Summary

This problem specifically affects widgets that have not yet been voted on. When the widget is empty, the description text is blank and the description is given a class of "fivestar-summary-". This should be populated with "No votes yet." and have a class that matches the configuration settings for that node type.

This problem seems to be caused by using NULL as the default value for votes if they're not found. When theme_fivestar_summary() is called, it specifically differentiates between NULL and a 0 value. However if we're passing in a value of NULL when a node hasn't received any votes, this results in all the parameters being NULL and no text is generated at all. We should pass in 0 when a user hasn't voted.

AttachmentSizeStatusTest resultOperations
fivestar_empty_text5.patch1.47 KBIgnored: Check issue status.NoneNone
fivestar_empty_text6.patch2.19 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» fixed

Committed. Please reopen if any problems were caused directly by this patch.

#2

Oops a dvm and some other patches slipped into this. Removed.

#3

Status:fixed» closed (fixed)

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

nobody click here