- 🇫🇷France tostinni
Here is a shot at it.
The problem is causing by the fact that the functionentityShouldBeSaved
is only checking base fields of the entity, thus when a reference is present it will only check its target_id which won't change if any of the referenced entity field is changed.The patch add a nested logic to drill into fields of
entity_reference
(nodes, terms, medias...) andentity_reference_revisions
(used for paragraphs).We had to add a check for $new_field to be a valid field as in some case we had strings., so I guess a few eyeballs on this should help.