Incorrect Usage of Form Element $form['bundle']

Created on 16 March 2017, almost 8 years ago
Updated 2 May 2024, 8 months ago

I saw warning messages like following after having module 'unique_field' installed:

User error: "bundle" is an invalid render array key in Drupal\Core\Render\Element::children()

The reason is that the variable $form['bundle'] injected is not a valid Drupal 8 form element and can't be rendered. To fix/bypass the warnings, I changed variable name from $form['bundle'] to $form['#bundle']. It might not be a perfect solution but it works.

Patch file attached.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada deminy Canada

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024