| Project: | Fivestar |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
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 ?
Comments
#1
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().
#2