Fivestart CCK casts zero votes (effectively resetting them) when review node (i.e. containing fivestar field) is unpublished with status=0. This works for simple setups but there are problems for advanced uses. Add workflow module with node access and you will have situation where review node must always have status=1 (i.e. be published in Drupal core terms) for node access rules to apply. Then you have broken voting because reviews that did not pass moderation yet already cast their votes. I think everyone who has good knowledge of Drupal knows that $node->status has just poor implementation in Drupal and many advanced setups include additional means to flag node as "published".

I think there must be some means to control if vote should be cast depending on review node state. What about some custom hook ?

CommentFileSizeAuthor
#1 fivestar-field-vote-alter.patch662 bytescrea

Comments

crea’s picture

Status: Active » Needs review
StatusFileSize
new662 bytes

Attached patch adds support for hook_fivestar_field_vote_alter() and is generally safe. Alteration happens in fivestar_field() because information about review node is not passed into _fivestar_vote_cast().

crea’s picture

Title: Fivestar CCK field vote casting should be more configurable » Allow custom unpublished states in Fivestar CCK field
dbt102’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

Drupal 6 is now end of life, and is no longer supported. So Drupal 6 issues for Fivestar are being closed as "Closed (won't fix)". However, we don't want users who are porting from Drupal 6 to 7 to feel unwanted, so if you have any migration issues, please open them as Drupal 8 issues.