Okay. Little summary.
Notice: Undefined index: field_date in date_combo_validate() (line 454 in sites/all/modules/contrib/date/date_elements.inc).
Notice: Undefined index: field_date in date_combo_validate() (line 455 in sites/all/modules/contrib/date/date_elements.inc).And my date fields was empty...
If we look to the latest code we can found this:
$item = $form_values[$field_name][$langcode][$delta];
$posted = $form_input[$field_name][$langcode][$delta];
I get this errors on order edit form(drupal commerce).
Date field attached to customer profile.
So actually $item located in
$form_values['commerce_customer_billing']['und']['profiles'][0]['field_date']['und'][0]
instead
$form_values['field_date']['und'][0]
Same to $pasted variable!
To fix this we need to use ['element']['#parents'] and drupal_array_get_nested_value
Attached patch fix problem.
| Comment | File | Size | Author |
|---|---|---|---|
| date_parents.patch | 614 bytes | 5n00py |
Comments
Comment #1
5n00py commentedSomeone can review/commit my patch?
Comment #2
westwesterson commentedThis patch fixed the problem for me :)
Comment #3
lcampanis commentedFixed for me too :)
I had a field collection with an image upload (enabled alt & title)
And a date field.
Comment #4
5n00py commentedAll people who have same problems(not a lot, but) confirm that patch solve the problem.
Comment #5
cafuego commentedTests appear fixed, re-test this patch.
Comment #6
cafuego commenteddate_parents.patch queued for re-testing.
Comment #7
5n00py commentedPass at Sun, 09/29/2013 - 08:17:28
Comment #8
5n00py commentedCan this one be committed to 7.x ? W/o this patch my field is broken :(
Patch just use proper api calls instead hardcoded array keys.
Comment #9
cafuego commentedCommitted to 7.x-2.x-dev, thanks for the patch!