diff -u b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php --- b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php +++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php @@ -364,8 +364,7 @@ } // Massage in some values. - $handler = $this->getComponentHandlerByElementName($name); - if ($handler) { + if ($handler = $this->getComponentHandlerByElementName($name)) { $options = $handler->massageIn($name, $options); } @@ -603,18 +602,19 @@ * @param string $name * The name of the element. * - * @return \Drupal\Core\Entity\DisplayComponentHandlerInterface + * @return \Drupal\Core\Entity\DisplayComponentHandlerInterface|false * The display component handler. */ public function getComponentHandlerByElementName($name) { if (!isset($this->handlers[$name])) { $handlers = $this->handlerManager->getDefinitions(); + $handler = FALSE; foreach (array_keys($handlers) as $type) { $handler = $this->getComponentHandler($type); if ($handler && $handler->hasElement($name)) { break; } - $handler = NULL; + $handler = FALSE; } $this->handlers[$name] = $handler; } only in patch2: unchanged: --- a/core/modules/views/src/Entity/Render/EntityFieldRenderer.php +++ b/core/modules/views/src/Entity/Render/EntityFieldRenderer.php @@ -250,6 +250,7 @@ protected function buildFields(array $values) { $display->setComponent($field->definition['field_name'], [ 'type' => $field->options['type'], 'settings' => $field->options['settings'], + 'label' => $field->label(), ]); } // Let the display build the render array for the entities.