diff --git a/src/View/FieldViewBuilder.php b/src/View/FieldViewBuilder.php index e259567..49e3527 100644 --- a/src/View/FieldViewBuilder.php +++ b/src/View/FieldViewBuilder.php @@ -53,9 +53,9 @@ class FieldViewBuilder { $build = []; + $entity = $this->entityRepository->getTranslationFromContext($entity, $langcode); $access = $check_access ? $entity->access('view', NULL, TRUE) : AccessResult::allowed(); if ($access->isAllowed()) { - $entity = $this->entityRepository->getTranslationFromContext($entity, $langcode); if (!isset($entity->{$field_name})) { // @todo Trigger error here. return [];