I originally posted this as an issue for imagefield_crop (http://drupal.org/node/1864496) because, as I stated in that post, I had found a similar issue that made me think it was *that* module. However, I have since found a similar issue (when a date field was used in a collection) for field_collection that prompts me to post the issue here. In any case, the maintainers of both modules can figure out whose problem it is.
I'm using imagefield_crop with the field_collection module and I'm actually getting the following three errors on each image attached to the node. These errors come up when I save the node even if I haven't modified (added or removed) any of the images.
Notice: Undefined property: FieldCollectionItemEntity::$language in _imagefield_crop_entity_presave() (line 264 of C:\path\to\my\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Undefined index: in _imagefield_crop_entity_presave() (line 264 of C:\path\to\my\sites\all\modules\imagefield_crop\imagefield_crop.module).
Warning: Invalid argument supplied for foreach() in _imagefield_crop_entity_presave() (line 264 of C:\path\to\my\sites\all\modules\imagefield_crop\imagefield_crop.module).
Comments
Comment #1
leex commentedI'm also getting this error from the metatag module, definitely seems like Field Collection isn't setting $language properly. Either that or all related modules aren't testing properly.
Comment #2
nimi commentedSame problem for me too. Any ideas what's this error about?
Comment #3
extexan commentedIt appears that the field collection module is simply not setting the language field (of the entity object) in all cases. If you are using the imagecrop module, here's a temporary(?) fix until the field collection module gets fixed... http://drupal.org/node/1864496#comment-6980982
If you're having the problem in a different module, perhaps this will give you an idea of how to put in a temp fix there as well.
Comment #4
jmuzz commentedTranslation support for Field Collections is still a work in progress, as explained in the README.
#1316162: Support content translation and host entity cloning
#1344672: Field Collection: Field translation (entity_translation) support.