On the Cornell AAP website, many nodes use field collections, and recently had to make some content types translatable. Field collections are not translatable by default - there is a patch that needs to be applied. I'm going to write about how to do this so you don't have to waste a good part of your day figuring it out.
At the time this post was written the module and Drupal versions used are:
- Drupal 7.42
- Field Collection 7.x-1.0-beta11
1. Get the patch
Download the patch (field_collection-add_entity_translation_support-1344672-459.patch) from comment #459 and put it in modules/field_collection.
2. Apply the patch
Open terminal, cd to modules/field_collection then type in patch < field_collection-add_entity_translation_support-1344672-459.patch
3. That's it. Still not working?
I ran into two errors, both are very easy fixes.
Error #1: PHP Fatal error: Class 'EntityTranslationFieldCollectionItemHandler'
Solution: move the file field_collection/translation.handler.field_collection_item.inc to field_collection/includes/translation.handler.field_collection_item.inc then clear cache.
Error #2: EntityMalformedException: Missing bundle property on entity of type node
This error popped up when I was edited then saved a translated node. For example, the default language was English and there was a Chinese translation. Saving the Chinese translation threw that error.
Solution: delete the translation node (delete the Chinese translation node) then recreate the translation.