CCK "Option Widgets" are not functional in CCK HEAD. Fields created with an option widget (independently of the type) appears on the node editing form but are not saved in the database. Moreover, data saved was not correctly loaded and the default value form was dysfunctional.
The problem lies mostly in the logic of optionwidgets_validate(): because the validation occurs at the top-level element, we don't need to look for a parent.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | d6-cck-optionwidgets.patch | 3.49 KB | yched |
| d6-cck-optionwidgets.patch | 2.25 KB | damien tournoud |
Comments
Comment #1
yched commentedPatch seems to work OK for select and radios / checkbox, except selecting no value doesn't 'take' (the node keeps the previous values)
Doesn't seem to fix 'single on / off' checkboxes, though.
Comment #2
yched commentedUpdated patch brings the same fix to 'single checkbox'.
Still doesn't fix the 'select no value' issue.
Comment #3
yched commentedOK, I committed a few fixes to optionwidgets (mainly derived from the debugging work by damz), and I think the 'optionwidgets.module' part of this bug is now fixed.
Please reopen if some bugs reappear (many cases, hard to test all)
A more general problem now is http://drupal.org/node/226264 (single fields cannot be emptied)
Comment #4
yched commentedOK, it seems nodereference select widget (which now internally uses optionwidgets) is broken
Not sure this is related to the recent changes, or if it was broken before :-)
Needs some investigation.
Comment #5
damien tournoud commentedAfter investigation, there seems to be (at least) two problems:
nodereference_select_validate()is called beforeoptionwidgets_validate()form_set_value()does not appear in$elementof the parents_validate()Comment #6
karens commentedThis worked fine before, so something has changed. When I set this up nodereference validation fired *after* optionwidgets validation. The second point in #5 is true, I ran into this too (maybe sort of a bug in FAPI) so you have to use the global $form_values to get anything that might have been changed using form_set_value() previous to the current step when dealing with multiple validation operations.
I'll investigate this if I get time.
Comment #7
damien tournoud commentedThe addition of the
#validationoption foroptionwidgets_validatechanged between r1.40 and r1.41 (diff). Before, it was added at the element level, but now it is added after processing.Comment #8
CosmicVoyager commentedsubscribed
Comment #9
karens commentedJust committed a fix for this.
Comment #10
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.