Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When I use the comment widget to rate nodes out of the core comment modul and set the fivestar comment settings to "Require Rating", it is still possible to submit a comment without rating.
Is there a fix for this bug? Perhaps it is only a problem with the 6.x-1.12 Version.
Comment | File | Size | Author |
---|---|---|---|
#8 | fivestar293258_2.patch | 1.1 KB | vladimir.dolgopolov |
#6 | fivestar293258.patch | 1.12 KB | vladimir.dolgopolov |
Comments
Comment #1
911 CreditAttribution: 911 commentedNo fix for this bug? Any help is appriciated. Forcing user to give a vote while commenting is important for a simple review system with fivestar.
Best Regards
Comment #2
vladimir.dolgopolov CreditAttribution: vladimir.dolgopolov commentedThat's because of:
in fivestar.module.
Sign '-' lets a vote be valid.
Comment #3
vladimir.dolgopolov CreditAttribution: vladimir.dolgopolov commentedIt's strange fivestar_validate() should handle this sutuation but it never runs.
Comment #4
911 CreditAttribution: 911 commentedHi vladimir,
thanks for your help.
What does that mean? Is there a way to fix this?
Comment #5
vladimir.dolgopolov CreditAttribution: vladimir.dolgopolov commentedI'm searching the way.
It seems fivestar_validate() should definitely do that but it doesn't.
Comment #6
vladimir.dolgopolov CreditAttribution: vladimir.dolgopolov commentedI think I've found the issue in fivestar.module:
Before:
After:
The origin is http://api.drupal.org/api/file/developer/topics/forms_api_reference.html...
The patch is not fully tested.
Comment #7
vladimir.dolgopolov CreditAttribution: vladimir.dolgopolov commentedcode needs review
Comment #8
vladimir.dolgopolov CreditAttribution: vladimir.dolgopolov commentedRerolled patch. Replaced $form_state with $element.
Comment #9
quicksketchThanks vladimir! Nice catch, a lingering piece of un-upgraded code from the D5 version.
Comment #10
quicksketchComment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.