Hi!
Very useful module! Thx a lot!
But there is an issue. The module uses the entity language key to retrieve the field value:
$lang = LANGUAGE_NONE;
if (isset($context['entity']->language)) {
$lang = $context['entity']->language;
}
...
$display_mode = $context['entity']->{$field_name}[$lang][0]['entity_display'];
this is not right. The entity language is often different than the field language. I provided a patch to use the right language key.
| Comment | File | Size | Author |
|---|---|---|---|
| field_language_patch.patch | 1.04 KB | ckidow |
Comments
Comment #1
xtfer commentedThanks for that. I will review.
Comment #2
ckidowA more elegant solution is to use field_get_items: