WSOD with Route "view.taxonomy_term.feed_1" does not exist

Created on 6 January 2021, almost 4 years ago
Updated 24 March 2022, over 2 years ago

Problem/Motivation

We don't use RSS neither have we enabled any taxonomy display for the sitemap. Anyway the following error appears and breaks the sitemap with a WSOD:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.taxonomy_term.feed_1" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute() (Line: 271)
Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 762)
Drupal\Core\Url->toString() (Line: 455)
Drupal\sitemap\Plugin\Sitemap\Vocabulary->buildLink() (Line: 343)
Drupal\sitemap\Plugin\Sitemap\Vocabulary->buildFeedLink() (Line: 274)
Drupal\sitemap\Plugin\Sitemap\Vocabulary->buildSitemapTerm() (Line: 384)
Drupal\sitemap\Plugin\Sitemap\Vocabulary->buildList() (Line: 226)
Drupal\sitemap\Plugin\Sitemap\Vocabulary->view() (Line: 79)
Drupal\sitemap\Controller\SitemapController->buildSitemap()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 708)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Delete view.taxonomy_term or view.taxonomy_term.feed_1
Open /sitemap
==> ERROR

Proposed resolution

  • Do not execute disabled elements / routes (it's also bad for performance and makes no sense to me)
  • Always check the existence of the route before using it

Remaining tasks

  1. Discuss
  2. Implement
  3. Write tests

User interface changes

  • Optionally add option "Show RSS Feed" or something similar

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States rjustin

    This is still an issue for a site I'm working on. I've ran a handful of tests, and nothing seems to resolve this other than to disable the "Enable RSS feed links" feature for all "Vocabulary" items selected.

    I'm curious if anyone else is having this same issue, even on the latest build of this module.

    Drupal: 9.5.11
    Sitemap: 2.0.0-beta6

Production build 0.71.5 2024