Non valid entities getting added to fields

Created on 24 September 2021, over 3 years ago
Updated 16 January 2023, over 2 years ago

I'm not sure how this was happening, but I noticed in my own implementation of this that non valid entities were getting added to some of my fields.

The way this was set up is that there was a reference A:
node type A, node type B
field_b_refs
field_a_refs

And reference B:
node type A, node type C
field_c_refs
field_a_refs

And, somehow, node type B was getting added to field_c_refs on node type A when updating field_b_refs on node type A.

This then caused a cascading reference update that ended up with all past values getting deleted from field_b_refs (as well as the corresponding values being deleted from field_a_refs on node type B).

πŸ› Bug report
Status

Needs work

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States wmcmillian-coalmarch

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

No activities found.

Production build 0.71.5 2024