diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php index 5b66530..0d4f798 100644 --- a/core/modules/views/src/Plugin/views/HandlerBase.php +++ b/core/modules/views/src/Plugin/views/HandlerBase.php @@ -709,7 +709,7 @@ public function getEntityType() { // If the user has configured a relationship on the handler take that into // account. if (!empty($this->options['relationship']) && $this->options['relationship'] != 'none') { - $views_data = $this->getViewsData()->get($this->view->relationship->table); + $views_data = $this->getViewsData()->get($this->view->relationship[$this->options['relationship']]->table); } else { $views_data = $this->getViewsData()->get($this->view->storage->get('base_table')); diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php index 98e7e50..32ad3e8 100644 --- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php +++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php @@ -284,6 +284,10 @@ public function getEntityTableInfo() { // Include all relationships. foreach ((array) $this->view->relationship as $relationship_id => $relationship) { + if (!isset($relationship->definition['base'])) { + debug($relationship->definition); + continue; + } $table_data = $views_data->get($relationship->definition['base']); if (isset($table_data['table']['entity type'])) { $entity_tables[$table_data['table']['entity type']] = array(