Skip to content
Snippets Groups Projects

Issue #3446764. Taxonomy with Depth Views Filter has to respect selected vocabulary on Table Joins

Open Issue #3446764. Taxonomy with Depth Views Filter has to respect selected vocabulary on Table Joins
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
@@ -67,6 +67,20 @@ public function query() {
$this->tableAlias = $this->query->ensureTable($this->view->storage->get('base_table'));
}
if (!empty($this->options['vid'])) {
$def = [
'table' => 'taxonomy_term_field_data',
'field' => 'tid',
'left_table' => 'taxonomy_index',
'left_field' => 'tid',
'type' => 'INNER',
];
$join = \Drupal::service('plugin.manager.views.join')
->createInstance('standard', $def);
$join_index_term = $this->query->addRelationship('ind_data', $join, 'taxonomy_term_field_data');
$this->query->addWhere($this->options['group'], "$join_index_term.vid", $this->options['vid'], 'IN');
}
$this->addSubQueryJoin($this->value);
}
Loading