Both functions try to get the target_type from $items[0]['target_type'].

But the $items[0] array only has a ['target_id'] index. This results in numerous repeating errors like this:
Notice: Undefined index: target_type in entityreference_field_uuid_load() (line 256 of /sites/all/modules/contrib/uuid/uuid.core.inc).
Notice: Undefined index: entity keys in entityreference_field_uuid_load() (line 256 of /sites/all/modules/contrib/uuid/uuid.core.inc).

This is also preventing me from doing a drush cc all.

The solution seems to be to get the target type from the $field argument passed to both functions. Each entityreference field has to be configured for a single entity type (target_type), so getting the target_type from the $field['settings']['target_type'] should be fine.

Patch coming.

Comments

jamesharv’s picture

Patch attached

jamesharv’s picture

Status: Active » Needs review

Updating status

skwashd’s picture

Status: Needs review » Fixed

Looks good. Committed as 51500e6.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

David_Rothstein’s picture