Fix warning: Undefined array key "#type" in bootstrap_barrio_preprocess_form_element()

Created on 20 December 2023, 11 months ago
Updated 12 August 2024, 3 months ago

Problem/Motivation

I faced an issue when I used Webform Workflows Element module which adds workflow to my webform, so when I open the submission the below warning appeared.

Warning: Undefined array key "#type" in bootstrap_barrio_preprocess_form_element() (line 503 of themes/contrib/bootstrap_barrio/bootstrap_barrio.theme).

I used the below:
Drupa;l 10.1.5
Bootstrap barrio 5.5.14
Webform 6.2.0
Webform workflows element 1.0.0-alpha3

Steps to reproduce

1- Install webform module.
2- Install webform workflows element module.
3- Create a new webform and add workflow to it.
4- Test the webform and add some submissions.
5- View any submission.
6- The above warning will appear.

Proposed resolution

I suggest add extra checks in hook_preprocess_form_element.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

5.5

Component

Code

Created by

🇯🇴Jordan Odai Atieh Amman

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

Comments & Activities

Production build 0.71.5 2024