diff --git a/field_collection.module b/field_collection.module index 0864010..01a412d 100644 --- a/field_collection.module +++ b/field_collection.module @@ -550,10 +550,6 @@ function field_collection_field_update($host_entity_type, $host_entity, $field, unset($original_by_id[$item['value']]); } - if ($field['translatable'] && module_exists('entity_translation') && entity_translation_enabled($host_entity_type)) { - unset($host_entity->{$field['field_name']}[LANGUAGE_NONE]); - } - // If there are removed items, care about deleting the item entities. if ($original_by_id) { $ids = array_flip($original_by_id); @@ -1404,7 +1400,9 @@ function field_collection_field_widget_embed_validate($element, &$form_state, $c // We have to populate the field_collection_item before we can attach it to // the form. - if (isset($field_state['entity'][$element['#delta']])) { + // We need to check that the item is not empty because it could be just the + // empty field collection added to the form by default. + if (isset($field_state['entity'][$element['#delta']]) && !field_collection_is_empty($field_state['entity'][$element['#delta']])) { $field_collection_item = $field_state['entity'][$element['#delta']]; } elseif ($form_state['values'][$field_state['array_parents'][0]][$field_state['array_parents'][1]][$element['#delta']]) {