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.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | cer-deleted_field_collection_errors-2486305-7.patch | 1.14 KB | azinck |
Comments
Comment #1
zmove commentedsame problem, but for line 335 instead of 438
Comment #2
DerTobi75 commentedSame here, after installing harmony_core, which creates new entity types.
The error appears on line 335!
Comment #3
zmove commentedany news about this error ?
Comment #4
malhadeff commentedSame issue here. Anyone figure this one out?
Comment #5
iseeaflyingcrane commentedi got the same error at line 438
Comment #6
azinck commentedCan 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.
Comment #7
azinck commentedWell, 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.
Comment #8
socialnicheguru commentedIs this the same issue, https://www.drupal.org/node/2352783? If so is this a dupe?
Comment #9
fox_01 commentedSeems 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.