Commit a31d81a5 authored by klausi's avatar klausi Committed by fago
Browse files

Issue #1866032 by klausi | NancyDru: Fixed EntityFieldQueryException: Unknown field.

parent 26e07fc6
......@@ -978,8 +978,9 @@ function field_collection_field_update($host_entity_type, $host_entity, $field,
* Implements hook_field_delete().
*/
function field_collection_field_delete($entity_type, $entity, $field, $instance, $langcode, &$items) {
$ids = field_collection_field_item_to_ids($items);
// Also delete all embedded entities.
if ($ids = field_collection_field_item_to_ids($items)) {
if ($ids && field_info_field($field['field_name'])) {
// We filter out entities that are still being referenced by other
// host-entities. This should never be the case, but it might happened e.g.
// when modules cloned a node without knowing about field-collection.
......
Supports Markdown
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