- Issue created by @mxh
- 🇩🇪Germany mxh Offenburg
Basically this part needs to be changed from
$form['token_name'] = [ '#type' => 'machine_name', '#machine_name' => [ 'exists' => [$this, 'alwaysFalse'], ], '#title' => $this->t('Token name'), '#description' => $this->t('Optionally define a token name of this render element. It will be made available under that token name for later usage.'), '#default_value' => $this->configuration['token_name'], '#required' => FALSE, '#weight' => -28, '#eca_token_reference' => TRUE, ];
into
$form['token_name'] = [ '#type' => 'textfield', '#maxlength' => 1024, '#title' => $this->t('Token name'), '#description' => $this->t('Optionally define a token name of this render element. It will be made available under that token name for later usage.'), '#default_value' => $this->configuration['token_name'], '#required' => FALSE, '#weight' => -28, '#eca_token_reference' => TRUE, ];
- First commit to issue fork.
- 🇧🇷Brazil julio_retkwa Balneário Camboriú
Hi @mxh I've added your suggestion to MR
Thank you!
- 🇩🇪Germany jurgenhaas Gottmadingen
This is looking good, thanks @julio_retkwa for your contribution.
We should add a follow-up issue to address the following related tasks:
- There are 11 other cases where the field type
machine_name
is being used, most of them allow tokens as well and could run into the same problem. We should replace them all for consistency. - Most of those cases support tokens or require a token reference, both of which not being declared in the form field configuration. That should be added.
- Form field validation: those fields that get the token reference attribute will still be validated. But others won't. We may consider our own validation as a replacement for the machine name validation that we've then lost.
- There are 11 other cases where the field type
- 🇩🇪Germany jurgenhaas Gottmadingen
Created follow-up issue 🐛 Avoid config form field type "machine_name" Active
Merged this into 2.1.x and will now port this back and also into 3.0.x
-
jurgenhaas →
committed cdf6cc4c on 2.1.x authored by
julio_retkwa →
#3518824: replace machine_name to textfield
-
jurgenhaas →
committed cdf6cc4c on 2.1.x authored by
julio_retkwa →
-
jurgenhaas →
committed cdf6cc4c on 3.0.x authored by
julio_retkwa →
#3518824: replace machine_name to textfield
-
jurgenhaas →
committed cdf6cc4c on 3.0.x authored by
julio_retkwa →
-
jurgenhaas →
committed a8dd6e86 on 2.0.x
#3518824: replace machine_name to textfield (cherry picked from commit...
-
jurgenhaas →
committed a8dd6e86 on 2.0.x
-
jurgenhaas →
committed f9cf5c10 on 1.1.x
#3518824: replace machine_name to textfield (cherry picked from commit...
-
jurgenhaas →
committed f9cf5c10 on 1.1.x