auto_entitylabel_entity_insert saves the entity and that is not allowed

Created on 19 June 2023, about 1 year ago

Problem/Motivation

The auto_entitylabel_entity_insert function saves the entity and that is not allowed according to hook_entity_insert documentation https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Entity%21...

It breaks the hook_entity_insert and hook_entity_updates hooks for others as they now both fire in reverse order for other modules.

Steps to reproduce

Add hook_entity_insert and hook_entity_updates to your module and make sure you use auto_entity_label on this entity.

On entity insert hook_entity_insert and hook_entity_updates will both fire in reverse order which is wrong

Proposed resolution

Remove the save from hook_entity_insert

Remaining tasks

Remove the save from hook_entity_insert

User interface changes

API changes

Remove the save from hook_entity_insert

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain JorisTheDrupalist

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024