diff --git a/core/modules/taxonomy/config/install/views.view.taxonomy_term.yml b/core/modules/taxonomy/config/install/views.view.taxonomy_term.yml index 8b7bf6a..cd39c79 100644 --- a/core/modules/taxonomy/config/install/views.view.taxonomy_term.yml +++ b/core/modules/taxonomy/config/install/views.view.taxonomy_term.yml @@ -105,9 +105,9 @@ display: dependencies: module: - taxonomy - default_action: ignore + default_action: 'not found' exception: - value: all + value: '' title_enable: false title: All title_enable: true @@ -183,6 +183,46 @@ display: group_items: { } plugin_id: language provider: views + status: + id: status + table: node_field_data + field: status + relationship: none + group_type: group + admin_label: '' + dependencies: + module: + - views + operator: '=' + value: true + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + plugin_id: boolean + provider: views style: type: default options: diff --git a/core/modules/taxonomy/src/Tests/RssTest.php b/core/modules/taxonomy/src/Tests/RssTest.php index acfc4ae..8b9a286 100644 --- a/core/modules/taxonomy/src/Tests/RssTest.php +++ b/core/modules/taxonomy/src/Tests/RssTest.php @@ -8,6 +8,7 @@ namespace Drupal\taxonomy\Tests; use Drupal\Core\Field\FieldStorageDefinitionInterface; +use Drupal\views\Views; /** * Ensure that data added as terms appears in RSS feeds if "RSS Category" format @@ -106,5 +107,27 @@ function testTaxonomyRss() { // Test that the feed page exists for the term. $this->drupalGet("taxonomy/term/{$term1->id()}/feed"); $this->assertRaw('drupalGet('taxonomy/term/all/feed'); + $this->assertResponse(404); + // Set the exception value to 'all'. + $view = Views::getView('taxonomy_term'); + $arguments = $view->getDisplay()->getOption('arguments'); + $arguments['tid']['exception']['value'] = 'all'; + $view->getDisplay()->overrideOption('arguments', $arguments); + $view->storage->save(); + // Check the article is shown in the feed. + $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); + $raw_xml = format_xml_elements([[ + 'key' => 'title', + 'value' => $node->label(), + ]]); + $this->drupalGet('taxonomy/term/all/feed'); + $this->assertRaw($raw_xml); + // Unpublish the article and check that it is not shown in the feed. + $node->setPublished(FALSE)->save(); + $this->drupalGet('taxonomy/term/all/feed'); + $this->assertNoRaw($raw_xml); } }