diff -u b/src/Plugin/views/argument/IndexNameDepth.php b/src/Plugin/views/argument/IndexNameDepth.php --- b/src/Plugin/views/argument/IndexNameDepth.php +++ b/src/Plugin/views/argument/IndexNameDepth.php @@ -159,6 +159,7 @@ // Now build the subqueries. $subquery = $this->database->select('taxonomy_index', 'tn'); $subquery->addField('tn', 'nid'); + $subquery->addField('tn', 'nid'); $where = (new Condition('OR'))->condition('tn.tid', $tids, $operator); $last = "tn"; @@ -183,9 +184,9 @@ $subquery->condition($where); $ids = array_keys($subquery->execute()->fetchAllKeyed()); if (empty($ids)) { - $this->query->addWhere(0, "$this->tableAlias.$this->realField", [-1], 'IN'); + return $this->query->addWhere(0, "$this->tableAlias.$this->realField", [-1], 'IN'); } - $this->query->addWhere(0, "$this->tableAlias.$this->realField", $ids, 'IN'); + return $this->query->addWhere(0, "$this->tableAlias.$this->realField", $ids, 'IN'); } /**