From 5271f8f028068cdc4427732bb223e630a92d1e45 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Tue, 31 Mar 2015 17:16:44 +0100 Subject: [PATCH] Issue #2456951 by chx: Impossible to enable views if entities are not in SQL: part 2 --- core/modules/views/src/Entity/View.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php index 3a21a1379b4d..34b4ab093d3b 100644 --- a/core/modules/views/src/Entity/View.php +++ b/core/modules/views/src/Entity/View.php @@ -432,7 +432,11 @@ public function mergeDefaultDisplaysOptions() { * {@inheritdoc} */ public function isInstallable() { - return (bool) \Drupal::service('views.views_data')->get($this->base_table); + $table_definition = \Drupal::service('views.views_data')->get($this->base_table); + // Check whether the base table definition exists and contains a base table + // definition. For example, taxonomy_views_data_alter() defines + // node_field_data even if it doesn't exist as a base table. + return $table_definition && isset($table_definition['table']['base']); } /** -- GitLab