Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2011 at 16:57 UTC
Updated:
29 Jul 2014 at 20:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
loganfsmyth commentedThis changes it, so that when there is selected default value, the #default_value property is properly set to NULL, instead of the result of reset(), which was FALSE.
Again, this needs to be applied along with the patch in #811542: Regression: Required radios throw illegal choice error when none selected, at the moment in comment #70.
Comment #2
pillarsdotnet commentedLooks good, but marking as duplicate.
Added to #811542-72: Regression: Required radios throw illegal choice error when none selected
Comment #3
loganfsmyth commentedThat makes sense :)
Comment #4
pillarsdotnet commentedUn-marking as dup, because this causes a test to fail and I don't want to hold up the other issue on that account.
Comment #5
loganfsmyth commentedHere's a new patch that passes the tests, but I don't know if it really addresses the underlying issues.
The last test failed because, now that the 'radios' element has a null value, #value == '' of each underlying 'radio' element. This is hitting problems because it uses == to compare, so things with return_values of 0 will turn out 'checked'.
Comment #6
loganfsmyth commentedThinking on it more, this might be a better solution.
#type 'radio' is more specifically boolean, so it makes more sense to specify default_value FALSE if it shouldn't be checked.
Comment #7
loganfsmyth commentedRemoving 'needs review' because I have a new patch over at #811542: Regression: Required radios throw illegal choice error when none selected that includes the patch from comment 6.
Comment #8
pillarsdotnet commentedIn that case, this should be closed.
Comment #9
loganfsmyth commentedI guess. I didn't want to fully close it until I'd heard some kind of response in the other issue...