Summary

Voting doesn't work without javascript using the fivestar widget in views (as described in http://www.lullabot.com/node/425/play). Votes are not submitted. The cause for this seems to be a wrong form_id of the vote widget.

Steps to reproduce

  1. Enable fivestar for a content type (e.g. story and page)
  2. Build a view that lists one (or several) nodes and has a fivestar widget (clickable, with text) as described in http://www.lullabot.com/node/425/play
  3. Having the view, you can vote (ajax based) on your node
  4. Disable javascript in your browser
  5. Reload the view and submit a vote. Your vote is not taken into account, the widget still tells you "No votes yet

Comments

organicwire’s picture

StatusFileSize
new4.47 KB

Here's the exported view for testing.

organicwire’s picture

Here's a patch fixing the issue. The problem is that in fivestar.module, the custom widget is built with the form_id fivestar_custom_widget (fivestar_form(), line 1091). Later, when processing the submit data, form-data with this form_id is refused (fivestar_form_submit(), line 1299). Therefore, the form data is simply ignored.

The form fixes this by adding an alternative if condition $form_state['values']['form_id'] == 'fivestar_custom_widget'

organicwire’s picture

Oops, removed debug comment from patch.

organicwire’s picture

Status: Active » Needs review

Please review.

Status: Needs review » Needs work

The last submitted patch, fivestar_widget_not_working_wo_javascript-1895908-2.patch, failed testing.

organicwire’s picture

Status: Needs work » Needs review
StatusFileSize
new1.17 KB

Try this patch. The module path wasn't standard.

organicwire’s picture

Sorry, this was the wrong (original) patch again. Now the right one.

Status: Needs review » Needs work

The last submitted patch, fivestar_widget_not_working_wo_javascript-1895908-2.patch, failed testing.

organicwire’s picture

Status: Needs work » Needs review
StatusFileSize
new1.15 KB

Requeue for testing because testbot expects module in sites/default/modules.

Status: Needs review » Needs work

The last submitted patch, fivestar_widget_not_working_wo_javascript-1895908-2.patch, failed testing.

organicwire’s picture

It's still a wrong path in the patch. Another try.

organicwire’s picture

Status: Needs work » Needs review
organicwire’s picture

Anyone there for reviewing? The fix is there, we just need a little testing ;)

organicwire’s picture

Issue summary: View changes

Suggestion for content types for easier testing.

whiteph’s picture

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

We can no longer support the Drupal 6 version of Fivestar. It is in security maintenance mode only. When the Drupal 8 version of Fivestar is released, the Drupal 6 version will be officially deprecated.

whiteph’s picture