- Issue created by @RedwanJamous
When installing a site from existing configuration (e.g., via configuration sync or a distribution), roles with form_mode_control permissions (e.g., "Use the form mode X linked to node entity Y") trigger errors like:
Non-existent permission(s) assigned to role "editor" (editor) were removed. Invalid permission(s): use The form mode my_form_mode linked to node entity( article ).
This happens because those dynamically-generated permissions are missing proper dependencies
on their associated core.entity_form_display
configs. As a result, if the form display config isn't present, due to config import order for example, Drupal can't cleanly manage the permission.
roleToFormMode()
.Active
2.0
Code