diff --git a/field_collection.module b/field_collection.module index 6462014..4526cf7 100644 --- a/field_collection.module +++ b/field_collection.module @@ -1407,7 +1407,13 @@ function field_collection_field_widget_form(&$form, &$form_state, $field, $insta } field_form_set_state($field_parents, $field_name, $language, $form_state, $field_state); + + // field_attach_form() sets #entity_type and #bundle to + // the field_collection ones. We need to restore them back to + // the host entity ones. field_attach_form('field_collection_item', $field_collection_item, $element, $form_state, $language); + $element['#entity_type'] = $instance['entity_type']; + $element['#bundle'] = $instance['bundle']; if (empty($element['#required'])) { $element['#after_build'][] = 'field_collection_field_widget_embed_delay_required_validation';