Commit 39659d6a authored by jurgenhaas's avatar jurgenhaas

Issue #2664920 by madar: Formatter view for entity reference field displays source entity_type

parent a6615c0d
......@@ -237,12 +237,12 @@ function colorbox_field_formatter_field_formatter_view($entity_type, $entity, $f
$output = $item['value'];
}
else if (isset($item['target_id'])) {
$target = entity_load($instance['entity_type'], array($item['target_id']));
$target = entity_load($field['settings']['target_type'], array($item['target_id']));
if (is_array($target)) {
$target = reset($target);
}
$output = entity_label($instance['entity_type'], $target);
$uri = entity_uri($instance['entity_type'], $target);
$output = entity_label($field['settings']['target_type'], $target);
$uri = entity_uri($field['settings']['target_type'], $target);
}
else {
$output = FALSE;
......
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