diff --git a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php index c32ff95..c720ee9 100644 --- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php +++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php @@ -68,7 +68,7 @@ public function query() { $this->ensureMyTable(); $def = $this->definition; - $def['table'] = 'taxonomy_term_field_data'; + $def['table'] = 'taxonomy_term_data'; if (!array_filter($this->options['vids'])) { $taxonomy_index = $this->query->addTable('taxonomy_index', $this->relationship); @@ -85,10 +85,9 @@ public function query() { $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER'; $def['adjusted'] = TRUE; - $query = db_select('taxonomy_term_field_data', 'td'); + $query = db_select('taxonomy_term_data', 'td'); $query->addJoin($def['type'], 'taxonomy_index', 'tn', 'tn.tid = td.tid'); $query->condition('td.vid', array_filter($this->options['vids'])); - $query->condition('td.default_langcode', 1); $query->addTag('term_access'); $query->fields('td'); $query->fields('tn', array('nid')); @@ -100,7 +99,7 @@ public function query() { // use a short alias for this: $alias = $def['table'] . '_' . $this->table; - $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_field_data', $this->relationship); + $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_data', $this->relationship); } } diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc index 79c2037..99d31a5 100644 --- a/core/modules/taxonomy/taxonomy.views.inc +++ b/core/modules/taxonomy/taxonomy.views.inc @@ -32,7 +32,7 @@ function taxonomy_views_data() { ), ); - $data['taxonomy_term_field_data']['table']['group'] = t('Content'); + $data['taxonomy_term_field_data']['table']['group'] = t('Taxonomy term'); $data['taxonomy_term_field_data']['table']['entity type'] = 'taxonomy_term'; $data['taxonomy_term_field_data']['table']['join']['taxonomy_term_data'] = array( 'type' => 'INNER', @@ -81,7 +81,7 @@ function taxonomy_views_data() { 'id' => 'groupwise_max', 'relationship field' => 'tid', 'outer field' => 'taxonomy_term_data.tid', - 'argument table' => 'taxonomy_term_data', + 'argument table' => 'taxonomy_term_field_data', 'argument field' => 'tid', 'base' => 'node', 'field' => 'nid', @@ -291,7 +291,7 @@ function taxonomy_views_data() { 'help' => t('Display content if it has the selected taxonomy terms.'), 'argument' => array( 'id' => 'taxonomy_index_tid', - 'name table' => 'taxonomy_term_data', + 'name table' => 'taxonomy_term_field_data', 'name field' => 'name', 'empty field name' => t('Uncategorized'), 'numeric' => TRUE,