You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.
eldrich.module has a snippet of code to auto-populate a morph instance with the morph's defaults when it's saved without values. BUT. When saved via IEF, the entity instance doesn't seem to HAVE any values when hook_entity_presave fires. In particular, $field->isEmpty() always returns true, ensuring values are always overwritten.
It's a bad scene, man.
The text was updated successfully, but these errors were encountered:
More accurately, the StatBlock field doesn't seem to preserve its data between Inline Entity Form updates — the overwriting was just a symptom if it always being empty after an (attempted) save. Other fields, including custom ones like SkillReference, don't have the problem. And StatBlocks don't have the problem when they're not inside of an Inline Entity Form.
It definitely looks like an interaction between Inline Entity Form, StatBlock, and (potentially) Eck entities. Haven't had time to trace it all the way through the call stack and figure out where the ball is being dropped, but it happens with Muses as well.
In the short term, I've replaced Inline Entity Form for Statblock-Possessing Eck entities with EntityBrowser, which might actually be a little cleaner presentationally but is also ass on mobile, so we'll see how it goes.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
eldrich.module has a snippet of code to auto-populate a morph instance with the morph's defaults when it's saved without values. BUT. When saved via IEF, the entity instance doesn't seem to HAVE any values when hook_entity_presave fires. In particular, $field->isEmpty() always returns true, ensuring values are always overwritten.
It's a bad scene, man.
The text was updated successfully, but these errors were encountered: