hook_entity_type_alter function leads to infinite loop

Created on 18 January 2023, almost 2 years ago
Updated 27 February 2024, 10 months ago

I have an implementation of hook_entity_type_alter() that was accessing information from the private tempstore. After a cache clear, this leads to an infinite loop. PrivateTempStore has to get the owner, which leads to AccountProxy loading a User entity, which tries to load the entity type definitions, which runs all the entity_type_alter() functions, which is where we came in.

I don't know how to get around this except "Don't do that." Maybe if the kinds of calls that can lead to this result can be characterized, that could be added to the hook documentation?

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States brad.bulger

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024