I'm using field_collection to store a list of files with associated metadata.
When using such collections on a node the following Exception is thrown from common.inc
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids()
I tracked this back to this module, which is calling _apachesolr_attachments_update_parent_entity when inserting an entity.
_apachesolr_attachments_update_parent_entity makes the assumption that the entity is of type "node", when in fact the entity type should be "field_collection_item"
Patch attached
Comments
Comment #1
thtas commentedComment #2
chrisivens commentedI can confirm that this is an error. Patch seems to work on initial testing.
Comment #3
Angry Dan commentedThis is exactly what I just found - file field attached to a field collection item.
Not too sure about the rest of the function either. I've not looked too far into it, but it seems to make the assumption that a file will only ever be attached to one field:
Also, wondering if it should be using
entity_revision_load, givenfile_get_file_referencesreturns vid's?Comment #4
jummonk commentedI concur issue and solution. In my case it was caused when I tried to add the same video to a translated node where the video is a field of a field_collection on the node.
Comment #5
David_Rothstein commentedAdding a couple issues that seem like duplicates of this one. (Although actually the first one is older and has had a similar patch sitting there for a long time.)
Comment #6
David_Rothstein commentedRerolled the patch to apply correctly via Git.
Comment #7
gabesullice+1 for #6
Comment #8
pwolanin commentedthanks - sorry for the delay.