- Issue created by @jlscott
- Status changed to Needs review
4 months ago 3:38am 28 February 2024
The existing implementation of hook_ENTITY_TYPE_insert has two places where the entity is updated and saved. This is recursive and causes another round of calls to the presave and update hooks.
It is bad practice to save an entity while processing an insert or update hook. Changes to an entity should be done in a presave hook.
Add a new hook_ENTITY_TYPE_presave() and make the required updates there instead of in the insert hook.
Needs review
3.0
Code