diff -u b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid_pre_update.yml b/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_pre_update.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_filter_taxonomy_index_tid.yml @@ -5,8 +5,8 @@ - node - taxonomy - user -id: test_filter_taxonomy_index_tid_pre_update -label: test_filter_taxonomy_index_tid_pre_update +id: test_filter_taxonomy_index_tid +label: test_filter_taxonomy_index_tid module: views description: '' tag: '' reverted: --- b/core/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php +++ a/core/modules/views_ui/src/Form/Ajax/ConfigHandlerExtra.php @@ -93,10 +93,6 @@ */ public function validateForm(array &$form, FormStateInterface $form_state) { $form_state->get('handler')->validateExtraOptionsForm($form['options'], $form_state); - - if ($form_state->getErrors()) { - $form_state->set('rerender', TRUE); - } } /** only in patch2: unchanged: --- /dev/null +++ b/core/modules/taxonomy/src/EventSubscriber/ConfigImportSubscriber.php @@ -0,0 +1,76 @@ +entityTypeManager = $entity_type_manager; + } + + /** + * Updates old imported config formats to match the current schema. + * + * @param \Drupal\Core\Config\ConfigImporterEvent $event + * The Event to process. + */ + public function onConfigImporterImport(ConfigImporterEvent $event) { + // @see taxonomy_post_update_taxonomy_index_filter_multiple_vocabularies + // Load all views. + $views = $this->entityTypeManager->getStorage('view')->loadMultiple(); + + /* @var \Drupal\views\Entity\View[] $views */ + foreach ($views as $view) { + $save = FALSE; + $displays = $view->get('display'); + foreach (array_keys($displays) as $display_id) { + $display =& $view->getDisplay($display_id); + if (!empty($display['display_options']['filters'])) { + foreach ($display['display_options']['filters'] as &$filter) { + if ($filter['plugin_id'] === 'taxonomy_index_tid' && empty($filter['vids']) && !empty($filter['vid'])) { + $filter['vids'] = [$filter['vid']]; + unset($filter['vid']); + $save = TRUE; + } + } + } + } + if ($save) { + $view->save(); + } + } + } + + /** + * Registers the methods in this class that should be listeners. + * + * @return array + * An array of event listener definitions. + */ + static function getSubscribedEvents() { + $events[ConfigEvents::IMPORT][] = array('onConfigImporterImport', 40); + return $events; + } + +} \ No newline at end of file only in patch2: unchanged: --- a/core/modules/taxonomy/taxonomy.services.yml +++ b/core/modules/taxonomy/taxonomy.services.yml @@ -4,3 +4,8 @@ services: arguments: ['@entity.manager'] tags: - { name: breadcrumb_builder, priority: 1002 } + taxonomy.config_import_subscriber: + class: Drupal\taxonomy\EventSubscriber\ConfigImportSubscriber + arguments: ['@entity_type.manager'] + tags: + - { name: event_subscriber } \ No newline at end of file