Problem/Motivation

Each entity form set a default attribute on its route to inform of the current entity type and op performed.
This attribute is called "_entity_form".

Here is the example provided by entity.api.php:

entity.block.edit_form:
   path: '/admin/structure/block/manage/{block}'
   defaults:
     _entity_form: 'block.default'

Here is the way it is implemented for the taxonomy terms edit form:

entity.taxonomy_term.edit_form:
  path: '/taxonomy/term/{taxonomy_term}/edit'
  defaults:
    _entity_form: 'taxonomy_term.default'

This attribute is not set when exposing such forms through blocks for example, but only on their native form pages.
As forms steps intend to exposes forms like native elements it should set this attribute.

It could help communication with other modules that check this attribute, like https://www.drupal.org/project/autosave_form.

Steps to reproduce

Set a forms steps collection.
Install autosave_form module, configure it to be effective on the same entity type used on forms steps.
The autosave feature doesn't work.

Proposed resolution

Implement an checkbox (on by default) on the step level to retrieve this attribute from the entity type and set it.

Remaining tasks

Implementation.

User interface changes

New checkbox in the step configuration form.

API changes

None

Data model changes

None

Comments

nicoloye created an issue. See original summary.

nicoloye’s picture

Priority: Normal » Critical