Warning: Undefined array key "#type" en Drupal\Core\Form\FormHelper::processStates()

Created on 25 October 2023, 8 months ago
Updated 26 October 2023, 8 months ago

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 πŸ› Error: Call to undefined method BaseFieldDefinition::label() Fixed 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]".

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain omarlopesino

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024