Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2861318.2.patch | 3.85 KB | deminy |
Issue fork unique_field-2861318
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:
Comments
Comment #2
deminyComment #3
marcusx CreditAttribution: marcusx commentedDuplicate? #2832040: Render api fails because of invalid form element
Comment #7
AstonVictor CreditAttribution: AstonVictor as a volunteer and at DevBranch commentedthanks for the patch.
fixed.