Drupal 7 field collection error when adding translation

772 views Asked by At

I get the following error in Drupal when trying to add a translation to a Bean block containing a field collection with multiple entries.

  • Notice : Undefined offset: 1 in field_collection_field_widget_embed_validate() (line 1739 in C:\wamp\www\xxx\trunk\project\sites\all\modules\contrib\field_collection\field_collection.module).

  • EntityMalformedException : Missing bundle property on entity of type field_collection_item. in entity_extract_ids() (line 7766 dans C:\wamp\www\xxx\trunk\project\includes\common.inc).

  • Drupal 7.34
  • Field Collection 7.x-1.0-beta8

The translation is not saved. Any idea what could be causing this issue and/or how to fix it? Kindly let me know if there is any further info I could provide.

Thanks!

1

There are 1 answers

0
d4nyll On BEST ANSWER

My guess is you're using Entity Translation. Field collection is not supported for Entity translation. Please refer to the 'Restrictions' section of the README.txt file.

Despite that, I have found that if you originally enabled translation for the 'Field collection' field in the node, add your translation, and then disable translation for the 'Field collection' field in the node, and leave only the translation for the fields inside the field collection enabled. It will translate without error. But you won't be able to change the source language again (which defeats the purpose of a CMS), and only works if you have two languages.

tl;dr Since even the README.txt file says it's not supported, I'd recommend you not to use these two modules concurrently.