Commit 10957df3 authored by git's avatar git Committed by jmuzz
Browse files

Issue #2211667 by gmercer: Attach host entity to new field collection items...

Issue #2211667 by gmercer: Attach host entity to new field collection items created for the embed widget.
parent eb28ebd5
......@@ -1417,6 +1417,7 @@ function field_collection_field_widget_form(&$form, &$form_state, $field, $insta
// load.
if (empty($field_collection_item)) {
$field_collection_item = entity_create('field_collection_item', array('field_name' => $field_name));
$field_collection_item->setHostEntity($element['#entity_type'], $element['#entity']);
}
// Put our entity in the form state, so FAPI callbacks can access it.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment