diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php index af3d658..74a1177 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaEntityTest.php @@ -62,7 +62,7 @@ public function testEntityAreaData() { $entity_types = $this->container->get('entity.manager')->getDefinitions(); $expected_entities = array_filter($entity_types, function (EntityTypeInterface $entity_type) { - return $entity_type->hasViewBuilderClass(); + return $entity_type->hasViewBuilderClass() && $entity_type->getKey('uuid'); }); // Test that all expected entity types have data. diff --git a/core/modules/views/views.views.inc b/core/modules/views/views.views.inc index abbbf31..0acc879 100644 --- a/core/modules/views/views.views.inc +++ b/core/modules/views/views.views.inc @@ -130,8 +130,8 @@ function views_views_data() { // Registers an entity area handler per entity type. foreach (\Drupal::entityManager()->getDefinitions() as $entity_type_id => $entity_type) { - // Excludes entity types, which cannot be rendered. - if ($entity_type->hasViewBuilderClass()) { + // Excludes entity types, which cannot be rendered or that don't use UUID's. + if ($entity_type->hasViewBuilderClass() && $entity_type->getKey('uuid')) { $label = $entity_type->getLabel(); $data['views']['entity_' . $entity_type_id] = array( 'title' => t('Rendered entity - @label', array('@label' => $label)),