I'm setting the following relation
Entity Reference: Node » Season name » Player » Player name
Entity Reference: Node » Player » Season » Season name
where Player and Season are field collection

Player
»Player name
»Player number
»Player position
Season
»Season name

In case, I delete only the Player name CER works as expected.
In case, I delete Player field collection entry OR in case, I delete a field collection entry with already deleted Player name I got the following massage.
EntityMetadataWrapperException: Unable to get the data property field_player_name as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /home/sites/all/modules/entity/includes/entity.wrapper.inc)

Disabling the CER remove the error.

Comments

zmove’s picture

same problem, but for line 335 instead of 438

DerTobi75’s picture

Same here, after installing harmony_core, which creates new entity types.

The error appears on line 335!

zmove’s picture

any news about this error ?

malhadeff’s picture

Same issue here. Anyone figure this one out?

iseeaflyingcrane’s picture

i got the same error at line 438

azinck’s picture

Can confirm I'm seeing the same problem in a similar situation. The problem is that the Field Collection entity is already gone by the time cer_entity_update() is called on the host entity. I'm not yet sure of the best approach to fixing it.

azinck’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB

Well, this feels a little dirty. But I think it may be what we need to do in this case. I don't want to replicate the logic built into Entity API to traverse the EntityMetadataWrapper structure to determine if the entity referenced by a particular value is still in existence. So if an error is thrown in our call to EntityMetadataWrapper::raw() I'm just assuming the reason is due to the referenced entity no longer existing.

This should be ok, I think, because the appropriate relationships were already updated by CER when the Field Collection entity itself was deleted.

socialnicheguru’s picture

fox_01’s picture

Seems to be related to the issue #2807239: References will not get deleted if node gets deleted

I get a very similar error which is caused by a not updated reference field.

The patch #7 does not fix the issue for me.