Problem/Motivation
Trying to add the commerce webform order in a site having a commerce order item type with bundle fields, it appears this warning: "Warning: Undefined array key "#type" en Drupal\Core\Form\FormHelper::processStates() "
Steps to reproduce
1. Have a site with an order item type with bundle fields . It can happen also if it has just extra base fields.
2. Add commerce order Webform handler (it needs to be applied the patch from this issue first).
Proposed resolution
Fix this part of the code, because is adding the states in the key "$form['tabs_wrapper']['order_item'][$order_item_id][$field_id]" instead of "$form['tabs_wrapper']['order_item']['bundles'][$order_item_id][$field_id]".
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3396580-warning-undefined-array-3.patch | 830 bytes | omarlopesino |
Issue fork commerce_webform_order-3396580
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3396580-warning-undefined-array
compare
Comments
Comment #2
omarlopesinoComment #3
omarlopesinoCreated a branch (can't create MR), and attached a patch. Please review, thanks!
Comment #5
facine commentedFixed, thank you!
Please download and review the latest dev release.
Comment #6
omarlopesinoThanks! I confirm that the latest dev release fixes the problem and the warning does not appear anymore.