The check to see if a fivestar widget should be added to a node view only passes if the "vote" tag is enabled for that node type. To fix this bug, I made a function that checks if any tag has been enabled for that content type, if the vote tag hasn't been enabled for that content type. I decided not to deserialize the data and check the actual value, since values are deleted/not created if voting tags aren't enabled for the node type.

~Jakob

Comments

quicksketch’s picture

Status: Needs review » Needs work

Seems like a more efficient approach would be to look at the list of tags specified at admin/settings/fivestar, then do a variable_get() on all the possible tags. All variables are already loaded into memory, so it would prevent a database call. Also make sure you format your comments correctly with a Capital letter and ending with a period.

googletorp’s picture

Status: Needs work » Needs review
StatusFileSize
new2.05 KB

So I gave another stab at it and tried to clean up my comments as well. Let me know what you think.

~Jakob

ctrnz’s picture

In realy do not like this line in the patch

dpm($lookup . trim($tag));
googletorp’s picture

StatusFileSize
new2.02 KB

Removed the debugging code.

skolesnyk’s picture

Is it included in the .dev?

ctrnz’s picture

No it is not.
And path is only for this release http://drupal.org/node/459660
It will not work for 1.x

ezra-g’s picture

StatusFileSize
new1.9 KB

This patch no longer applied. I re-rolled and changed the function name to fivestar_widget_enabled() to be somewhat more descriptive.

ezra-g’s picture

Status: Needs review » Closed (duplicate)

This is part of the same symptom "widget ignoring settings" as #786224: Widget ignores settings.