Issue #2456951 by chx: Impossible to enable views if entities are not in SQL: part 2

8.0.x
Alex Pott 2015-03-31 17:16:44 +01:00
parent f76c925d59
commit 5271f8f028
1 changed files with 5 additions and 1 deletions

View File

@ -432,7 +432,11 @@ class View extends ConfigEntityBase implements ViewEntityInterface {
* {@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']);
}
/**