--- 2784233-179.patch 2021-04-15 05:43:03.000000000 +0800 +++ /Users/jungle/191.patch 2021-05-27 22:37:55.000000000 +0800 @@ -1,5 +1,5 @@ diff --git a/core/modules/node/src/Plugin/views/wizard/Node.php b/core/modules/node/src/Plugin/views/wizard/Node.php -index 24615eed88..4e75d9e486 100644 +index 07b176ccd4..4cf3365dd7 100644 --- a/core/modules/node/src/Plugin/views/wizard/Node.php +++ b/core/modules/node/src/Plugin/views/wizard/Node.php @@ -167,7 +167,7 @@ protected function defaultDisplayFiltersUser(array $form, FormStateInterface $fo @@ -32,7 +32,7 @@ type: string label: 'Selection type' diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php -index 44133826f1..c880384ac5 100644 +index f4df185111..916c92ea43 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -3,10 +3,12 @@ @@ -49,7 +49,7 @@ use Drupal\taxonomy\VocabularyStorageInterface; use Drupal\views\ViewExecutable; use Drupal\views\Plugin\views\display\DisplayPluginBase; -@@ -46,6 +48,13 @@ class TaxonomyIndexTid extends ManyToOne { +@@ -50,6 +52,13 @@ class TaxonomyIndexTid extends ManyToOne { */ protected $currentUser; @@ -63,7 +63,7 @@ /** * Constructs a TaxonomyIndexTid object. * -@@ -61,8 +70,10 @@ class TaxonomyIndexTid extends ManyToOne { +@@ -65,8 +74,10 @@ class TaxonomyIndexTid extends ManyToOne { * The term storage. * @param \Drupal\Core\Session\AccountInterface $current_user * The current user. @@ -75,7 +75,7 @@ parent::__construct($configuration, $plugin_id, $plugin_definition); $this->vocabularyStorage = $vocabulary_storage; $this->termStorage = $term_storage; -@@ -71,6 +82,11 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition +@@ -75,6 +86,11 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition $current_user = \Drupal::service('current_user'); } $this->currentUser = $current_user; @@ -87,7 +87,7 @@ } /** -@@ -83,7 +99,8 @@ public static function create(ContainerInterface $container, array $configuratio +@@ -87,7 +103,8 @@ public static function create(ContainerInterface $container, array $configuratio $plugin_definition, $container->get('entity_type.manager')->getStorage('taxonomy_vocabulary'), $container->get('entity_type.manager')->getStorage('taxonomy_term'), @@ -97,7 +97,7 @@ ); } -@@ -94,7 +111,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o +@@ -98,7 +115,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if (!empty($this->definition['vocabulary'])) { @@ -106,7 +106,7 @@ } } -@@ -114,34 +131,28 @@ protected function defineOptions() { +@@ -118,34 +135,28 @@ protected function defineOptions() { $options['type'] = ['default' => 'textfield']; $options['limit'] = ['default' => TRUE]; @@ -152,7 +152,7 @@ ]; } } -@@ -165,19 +176,32 @@ public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) { +@@ -169,19 +180,32 @@ public function buildExtraOptionsForm(&$form, FormStateInterface $form_state) { ]; } @@ -191,7 +191,7 @@ '#type' => 'textfield', '#default_value' => EntityAutocomplete::getEntityLabels($terms), ]; -@@ -185,30 +209,26 @@ protected function valueForm(&$form, FormStateInterface $form_state) { +@@ -189,30 +213,26 @@ protected function valueForm(&$form, FormStateInterface $form_state) { if ($this->options['limit']) { $form['value']['#type'] = 'entity_autocomplete'; $form['value']['#target_type'] = 'taxonomy_term'; @@ -231,7 +231,7 @@ ->accessCheck(TRUE) // @todo Sorting on vocabulary properties - // https://www.drupal.org/node/1821274. -@@ -219,15 +239,17 @@ protected function valueForm(&$form, FormStateInterface $form_state) { +@@ -223,15 +243,17 @@ protected function valueForm(&$form, FormStateInterface $form_state) { $query->condition('status', 1); } if ($this->options['limit']) { @@ -255,7 +255,7 @@ if ($exposed = $form_state->get('exposed')) { $identifier = $this->options['expose']['identifier']; -@@ -259,12 +281,11 @@ protected function valueForm(&$form, FormStateInterface $form_state) { +@@ -263,12 +285,11 @@ protected function valueForm(&$form, FormStateInterface $form_state) { } } } @@ -270,7 +270,7 @@ '#default_value' => $default_value, ]; -@@ -386,9 +407,11 @@ public function adminSummary() { +@@ -390,9 +411,11 @@ public function adminSummary() { if ($this->value) { $this->value = array_filter($this->value); @@ -284,7 +284,7 @@ } } return parent::adminSummary(); -@@ -413,8 +436,10 @@ public function getCacheContexts() { +@@ -417,8 +440,10 @@ public function getCacheContexts() { public function calculateDependencies() { $dependencies = parent::calculateDependencies(); @@ -297,7 +297,7 @@ foreach ($this->termStorage->loadMultiple($this->options['value']) as $term) { $dependencies[$term->getConfigDependencyKey()][] = $term->getConfigDependencyName(); -@@ -423,4 +448,45 @@ public function calculateDependencies() { +@@ -427,4 +452,45 @@ public function calculateDependencies() { return $dependencies; } @@ -380,7 +380,7 @@ + }); +} diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid.yml -index 85f9255209..28c0f3cd60 100644 +index be15a8f3e7..a86492817a 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid.yml @@ -165,7 +165,8 @@ display: @@ -394,7 +394,7 @@ error_message: true plugin_id: taxonomy_index_tid diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid__non_existing_dependency.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid__non_existing_dependency.yml -index 8c5736eab9..0c9a487da6 100644 +index ea9f640813..ad91187217 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid__non_existing_dependency.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid__non_existing_dependency.yml @@ -166,7 +166,8 @@ display: @@ -408,7 +408,7 @@ error_message: true plugin_id: taxonomy_index_tid diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid_depth.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid_depth.yml -index b093ce9eea..607ed4cf25 100644 +index aeaae4bda8..7adf4fda05 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid_depth.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid_depth.yml @@ -164,7 +164,8 @@ display: @@ -488,7 +488,7 @@ + +} diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php -index f447af3fb1..7002bedfb4 100644 +index d48d79414e..ecd000269e 100644 --- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php +++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php @@ -24,7 +24,10 @@ class TaxonomyIndexTidUiTest extends UITestBase { @@ -657,19 +657,6 @@ /** * Tests exposed taxonomy filters. */ -@@ -217,7 +315,11 @@ public function testExposedFilter() { - ]; - $this->drupalPostForm('admin/structure/views/nojs/add-handler/test_taxonomy_term_name/default/filter', $edit, 'Add and configure filter criteria'); - // Select 'Empty Vocabulary' and 'Autocomplete' from the list of options. -- $this->drupalPostForm('admin/structure/views/nojs/handler-extra/test_taxonomy_term_name/default/filter/tid', [], 'Apply and continue'); -+ $edit = [ -+ 'options[vids][empty_vocabulary]' => TRUE, -+ 'options[type]' => 'textfield', -+ ]; -+ $this->drupalPostForm('admin/structure/views/nojs/handler-extra/test_taxonomy_term_name/default/filter/tid', $edit, 'Apply and continue'); - // Expose the filter. - $edit = ['options[expose_button][checkbox][checkbox]' => TRUE]; - $this->drupalPostForm('admin/structure/views/nojs/handler/test_taxonomy_term_name/default/filter/tid', $edit, 'Expose filter'); diff --git a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php b/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php index e58429f64d..9f8def62af 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Views/TaxonomyIndexTidFilterTest.php @@ -776,7 +763,7 @@ + } diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_exposed_form_checkboxes.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_exposed_form_checkboxes.yml -index 1b2b8d917c..92c89c4167 100644 +index 923c335cd1..73249e113c 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_exposed_form_checkboxes.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_exposed_form_checkboxes.yml @@ -107,7 +107,8 @@ display: