- Issue created by @tstoeckler
- π©πͺGermany tstoeckler Essen, Germany
Was in the process of creating a merge request for this, but now repurposing this instead (without a merge reuqest for now). I had thought that the
type
of action configuration entities is in fact configurable in some way. For example, that theentity:publish_action
plugin ID is used regardless of the entity type and the entity type is determined by thetype
set in the action configuration. That's not actually the case, however. Instead, there is a plugin deriver that derives plugin definitions for all applicable entity types so that the actual plugin ID being used is, for example,entity:publish_action:media
. The type is then just copied over from that plugin definition'stype
property. This is also reflected in how the (now contrib) UI does things.And all those entity-type-specific, derived plugin definitions the config dependencies already end up being set up correctly, because the (derived) plugins add their entity type provider as a dependency and that then gets picked up by the action entity due to the use of a plugin collection.
So there really is no bug here unless we explicitly want to support setting an entity type ID as an action
type
for an action that does not extendEntityActionBase
. Instead, the question is why store thetype
at all, if it's just a "denormalized" version of the plugin's definition's type.The only usage I could find in core is in
views_views_data()
where Views decides whether or not to add a$entity_type . '_bulk_form'
views field to an entity type depending on whether there are any actions for that entity type. But that check could easily be changed to check the action plugin's definition instead.So I propose deprecating the
type
configuration property of actions.Re-titling and updating the issue summary, accordingly.