With using inline entity form when creating a second entity on the initial add page, an infinite/circular child reference is created - referencing the parent type's handler.
I've using ief 7.1.x dev, with patch from Add Entity Translation integration applied.
Everything works fine if you just add one entity when creating the parent entity. If you want to add another, or edit the first child entity, the new handler for the new entity gets the same id as the parent, and then the infinite/circular child to self reference is created. I'm guessing this is because the parent is cached so $newId is starting back at 1, instead of being properly incremented.
As a workaround, I added the entity bundle to the generation of $entity_translation_handler_id.
I'm sure there would be a better, more complete fix, but this at least allows it to work and not have notifyChildren() functions run forever in an infinite loop.
Comment | File | Size | Author |
---|---|---|---|
#5 | entity-translation-infinite-circular-reference-2166157-5.patch | 1.03 KB | ciss |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedPatch to change how entity_translation_handler_id is generated.
Comment #2
plachLooks good, but can we
call entity_extract_ids()
just once, please? :)Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedis this still an issue with the new dev release?
Comment #4
ciss CreditAttribution: ciss commentedComment #5
ciss CreditAttribution: ciss commentedI've updated the patch according to #2 and added a fallback to entity_type if bundle is null.
Comment #6
plachLooks good, thanks
Comment #7
plachCommitted and pushed, thanks.