- πΊπΈUnited States smustgrave
Came up as a daily BSI target
This still appears to be the case, example
* "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm"
But is it still a problem?
The form operations defined in an entity's annotation can be given arbitrary keys, thus:
* handlers = {
* "form" = {
* "default" = "Drupal\myentity\Form\MyEntityForm",
* "add" = "Drupal\myentity\Form\MyEntityForm",
* "foo-bar" = "Drupal\myentity\Form\MyEntityForm",
The system allows non-machine names here, such as 'foo-bar'.
This causes several problems.
The form operation name becomes part of the form ID, which is 'ENTITYTYPE-OPERATIONNAME-form', thus myentity_foo-bar_form. This won't work with hook_form_FORM_ID_alter(), as it won't make a PHP function name.
Also, form operation names correspond to entity form view modes, which are config entities and so have machine name IDs. That means that the 'foo-bar' operation can't have a matching view mode created for it.
Therefore, the entity system should enforce form operation names to be proper machine names.
Active
11.0 π₯
entity system
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Came up as a daily BSI target
This still appears to be the case, example
* "delete-multiple-confirm" = "Drupal\Core\Entity\Form\DeleteMultipleForm"
But is it still a problem?