Skip to content
Snippets Groups Projects
Commit 9080ffe4 authored by Youri van Koppen's avatar Youri van Koppen Committed by Anna Kalata
Browse files

Issue #3191218 by MegaChriz, Anybody, freelock, akalata: WSOD with Route...

Issue #3191218 by MegaChriz, Anybody, freelock, akalata: WSOD with Route "view.taxonomy_term.feed_1" does not exist
parent c63d28f4
Branches
Tags
1 merge request!3Issue #3191218: WSOD with Route "view.taxonomy_term.feed_1" does not exist
...@@ -339,7 +339,7 @@ class Vocabulary extends SitemapBase { ...@@ -339,7 +339,7 @@ class Vocabulary extends SitemapBase {
if ($rssDepth && isset($term->treeDepth) && $rssDepth >= $term->treeDepth) { if ($rssDepth && isset($term->treeDepth) && $rssDepth >= $term->treeDepth) {
// Route validation will be provided on form save and config update, // Route validation will be provided on form save and config update,
// rather than every time a link is created. // rather than every time a link is created.
if (isset($this->settings['rss_link'])) { if ($this->settings['enable_rss'] && !empty($this->settings['rss_link'])) {
return $this->buildLink($this->settings['rss_link'], $term->tid); return $this->buildLink($this->settings['rss_link'], $term->tid);
} }
} }
......
...@@ -112,4 +112,36 @@ class SitemapTaxonomyTest extends SitemapTaxonomyTestBase { ...@@ -112,4 +112,36 @@ class SitemapTaxonomyTest extends SitemapTaxonomyTestBase {
$this->drupalGet('/admin/config/search/sitemap'); $this->drupalGet('/admin/config/search/sitemap');
} }
/**
* Tests if the sitemap loads correctly after the taxonomy view gets disabled.
*/
public function testWithDisabledTaxonomyView() {
// Enable the Views module.
$this->container->get('module_installer')
->install(['views']);
// Create taxonomy terms.
$this->createTerms($this->vocabulary);
// Ensure that the sitemap gets loaded correctly.
$this->drupalGet('/sitemap');
$elements = $this->cssSelect(".sitemap-plugin--vocabulary");
$this->assertEqual(count($elements), 1, 'Vocabulary found.');
// Now disable the taxonomy view.
$this->container->get('entity_type.manager')
->getStorage('view')
->load('taxonomy_term')
->setStatus(FALSE)
->save();
// Flush cache to regenerate the sitemap.
drupal_flush_all_caches();
// And visit the sitemap again.
$this->drupalGet('/sitemap');
$elements = $this->cssSelect(".sitemap-plugin--vocabulary");
$this->assertEqual(count($elements), 1, 'Vocabulary found.');
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment