Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi there,
After adding content with a select or other field as part of a field_collection field (see field_collection module), the following error is shown:
Notice: Undefined index: other_unknown_defaults in select_or_other_field_widget_validate() (regel 296 van /home/sjxofphr/domains/schijftijd.nl/public_html/sites/all/modules/select_or_other/select_or_other.field_widget.inc)
No clue what this is all about, but i hope i've provided enough info...
Comment | File | Size | Author |
---|---|---|---|
#4 | select_or_other-7.x-2.x-field-instance-patch.txt | 877 bytes | rellis |
Comments
Comment #1
danielb CreditAttribution: danielb commentedComment #2
danielb CreditAttribution: danielb commentedI reckon it must be how the field_collection module works.
Here is the code from select_or_other_field_widget_validate():
If the field settings for select_or_other were saved properly then there should be a value in $form_state['field'][$field_name][$language]['instance']['widget']['settings']['other_unknown_defaults'].
The field collection module must change the data that is usually available to this module?
Comment #3
pau1_m CreditAttribution: pau1_m commentedsubscribing
Comment #4
rellis CreditAttribution: rellis commentedI think this is a problem in select_or_other -- see explanation
here http://drupal.org/node/1217150
And docs here:
http://api.drupal.org/api/drupal/modules--field--field.form.inc/function...
Attached is a patch for select_or_other.field_widget.inc
Comment #5
danielb CreditAttribution: danielb commentedComment #6
danielb CreditAttribution: danielb commentedI've committed rellis' patch, thanks.
Comment #8
ezeedub CreditAttribution: ezeedub commentedThis looks like it's back. I just got this error...
Notice: Undefined index: other_unknown_defaults in select_or_other_field_widget_validate() (line 365 of /path/to/drupal/sites/all/modules/contrib/select_or_other/select_or_other.field_widget.inc
Comment #9
danielb CreditAttribution: danielb commentedcheers, I've fixed that too.