eca_render: action_base.name typed as machine_name contradicts the plugin's documented "][" nesting syntax
Problem/Motivation
modules/render/config/schema/eca_render.schema.yml declares:
eca_render.action_base:
type: mapping
label: 'Render action base config'
mapping:
name:
type: machine_name
label: 'Machine name'But the plugin's own field description explicitly documents the opposite:
Optionally define a machine name of this render element. It will be made available under that name in the render array of the current event in scope. Nested elements can be set with using "][" brackets, for example
details][title. This field supports tokens.
][ is not valid in a machine_name. So the documented, supported and load-bearing syntax for nesting render elements is rejected by the config schema. Every nested render element produces a violation:
The "contract_container][sign_contract" machine name is not valid.
The "container_animals][view" machine name is not valid.The machine_name type also disallows the tokens the description says the field supports.
This is a schema bug, not a configuration bug — the values are correct and functional. It is important that it is understood that way, because "correcting" these values to satisfy the schema would collapse the render-array nesting and cause a real regression. On one real site this accounts for 12 violations, all of them false positives on working configuration.
Steps to reproduce
- Add an
eca_render_markupaction (or anyeca_render.action_baseconsumer) to an ECA model. - Set Machine name to a nested value such as
details][title, exactly as the field description instructs. - Validate the resulting
eca.eca.*config against its typed schema.
Result: The "details][title" machine name is not valid.
Expected: No violation — this is the documented syntax.
Proposed resolution
Replace type: machine_name with a type that permits both the ][ nesting syntax and tokens. Either:
type: string— simplest, and matches the field's actual contract, or- a dedicated type with a
Regexconstraint allowing machine-name segments separated by][, plus token syntax.
Option 2 preserves some validation value; option 1 is the minimal correct fix.
Note that the same review should cover eca_render.action_base.mode, which has a related problem — see the companion issue about the _eca_token sentinel being omitted from Choice constraints.
Remaining tasks
- Choose a replacement type
- Update
eca_render.schema.yml - Add test coverage for a nested
][machine name and for a tokenized value
User interface changes
None.
Data model changes
None.
Environment: ECA 3.1.5, Drupal 11.
AI-Generated: Yes (Used OpenCode to analyze typed-config validation output on a production site, trace the contradiction between the schema type and the plugin's documented contract, and draft this report. All references were verified against the installed code.)