diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index 65f4439..35c4c73 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -218,7 +218,7 @@ protected function valueValidate($form, FormStateInterface $form_state) { } $values = Tags::explode($form_state['values']['options']['value']); - $tids = $this->validate_term_strings($form['value'], $values); + $tids = $this->validate_term_strings($form['value'], $values, $form_state); if ($tids) { $form_state['values']['options']['value'] = $tids; @@ -273,7 +273,7 @@ public function validateExposed(&$form, FormStateInterface $form_state) { $values = Tags::explode($form_state['values'][$identifier]); - $tids = $this->validate_term_strings($form[$identifier], $values); + $tids = $this->validate_term_strings($form[$identifier], $values, $form_state); if ($tids) { $this->validated_exposed_input = $tids; } @@ -288,11 +288,13 @@ public function validateExposed(&$form, FormStateInterface $form_state) { * The form which is used, either the views ui or the exposed filters. * @param $values * The taxonomy names which will be converted to tids. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The current state of the form. * * @return array * The taxonomy ids fo all validated terms. */ - function validate_term_strings(&$form, $values) { + function validate_term_strings(&$form, $values, FormStateInterface $form_state) { if (empty($values)) { return array(); } diff --git a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php index 86759f1..5b0b355 100644 --- a/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php +++ b/core/modules/taxonomy/src/Tests/Views/RelationshipNodeTermDataTest.php @@ -37,6 +37,8 @@ function testViewsHandlerRelationshipNodeTermData() { $this->column_map = array('nid' => 'nid'); $this->assertIdenticalResultset($view, $resultset, $this->column_map); + $view = Views::getView('test_taxonomy_node_term_data'); + $view->initHandlers(); // Change the view to test relation limited by vocabulary. $view->relationship['term_node_tid']->options['vids'] = ['tags' => 'tags']; $this->executeView($view, array($this->term1->id(), $this->term2->id()));