Closed (outdated)
Project:
Field collection
Version:
7.x-1.0-beta2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2011 at 15:00 UTC
Updated:
14 Nov 2016 at 20:04 UTC
Jump to comment: Most recent
Comments
Comment #1
derMatze commentedI thought it should be something like
entity_load('field_collection_item', array(1, 2));
But that is throwing the Exception: Invalid field name given...
Even this
field_collection_item_load(1);
throws an exception:
Exception: Invalid field name given. in FieldCollectionItemEntity->__construct() (Line 107 in .../sites/all/modules/contrib/field_collection/field_collection.module).
Comment #2
derMatze commentedOk, it's the same problem that was mentioned here:
http://drupal.org/node/1084268
Comment #3
nerdcore commentedI am not receiving the errors mentioned in either this nor the other Issue mentioned in #2, but I am unable to load entities of type 'field_collection_item'.
I am trying to use entity_load as such:
$entities = entity_load('field_collection_item', array(1));But $entities is empty. I've also tried the extended
$entities = entity_load('field_collection_item', array(1), array(), FALSE);As entity_load is called by field_collection_item_load_multiple(...), but both methods result in an empty array.
EDIT: The ID I am using exists, but there may be revisions of this ID. What is the process for loading revised entities?
Comment #4
jmuzz commentedI looked at the linked issue and I believe this should be working now.