From 010d52a3f6d966df2e9a37fcbf2bd35455de7bfc Mon Sep 17 00:00:00 2001 From: marcvangend <marcvangend@158153.no-reply.drupal.org> Date: Mon, 23 Apr 2018 10:51:45 +0200 Subject: [PATCH] Issue #2613144 by marcvangend: Field default value does not show in the block --- src/Plugin/Block/FieldBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Plugin/Block/FieldBlock.php b/src/Plugin/Block/FieldBlock.php index ae95368..e0d7e93 100644 --- a/src/Plugin/Block/FieldBlock.php +++ b/src/Plugin/Block/FieldBlock.php @@ -324,7 +324,7 @@ class FieldBlock extends BlockBase implements ContainerFactoryPluginInterface { if ($entity instanceof ContentEntityInterface && $entity->getEntityTypeId() === $entity_type && $entity->hasField($this->configuration['field_name'])) { $field = $entity->get($this->configuration['field_name']); - return AccessResult::allowedIf(!$field->isEmpty() && $field->access('view', $account)); + return AccessResult::allowedIf($field->access('view', $account)); } return AccessResult::forbidden(); } -- GitLab