Problem/Motivation

The value for render element in form_options_attributes_theme is wrong and leads to errors during processing in specific conditions. Instead of 'elements' it should use the singular version 'element' just like the base theme, see select in https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Theme%21T...

'select' => [
  'render element' => 'element',
  'initial preprocess' => FormPreprocess::class . ':preprocessSelect',
],

Steps to reproduce

Not sure for the steps, as my setup is very custom.

Proposed resolution

Change

'form_options_attributes__select__options_attributes' => [
  'render element' => 'elements',
  'base hook' => 'select',
],

to

'form_options_attributes__select__options_attributes' => [
  'render element' => 'element',
  'base hook' => 'select',
],

Remaining tasks

Add steps to reproduce.

User interface changes

None

API changes

None

Data model changes

None

Command icon 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

berliner created an issue. See original summary.

berliner’s picture

Status: Active » Needs review

Opened MR with a change that solves the issue for me.

berliner’s picture

Title: Wrong value for "render element" in hook_theme() » Wrong value for 'render element' in hook_theme()

zengenuity made their first commit to this issue’s fork.

zengenuity’s picture

Status: Needs review » Fixed

Merged. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

zengenuity’s picture

This is now part of the 2.1.1 release.

zengenuity’s picture

This is now part of the 2.1.1 release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.