Update views.view.aggregator_rss_feed update path resets the display path to site root

Created on 4 October 2023, about 1 year ago
Updated 6 October 2023, about 1 year ago

Problem/Motivation

The aggregator_update_8601() update path re-saves the RSS view which resets the path to the view to "/" which is the homepage <front> route, causing the following error:

InvalidArgumentException: Cannot redirect to an empty URL. in Symfony\Component\HttpFoundation\RedirectResponse->setTargetUrl() (line 68 of /var/www/html/vendor/symfony/http-foundation/RedirectResponse.php).
Drupal\Component\HttpFoundation\SecuredRedirectResponse->setTargetUrl() (Line: 39)
Symfony\Component\HttpFoundation\RedirectResponse->__construct() (Line: 26)
Drupal\Core\Routing\TrustedRedirectResponse->__construct() (Line: 127)
Drupal\redirect\EventSubscriber\RouteNormalizerRequestSubscriber->onKernelRequestRedirect()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 46)
Drupal\oe_webtools_laco_service\StackMiddleware\LacoServiceMiddlewareBase->doHandle() (Line: 21)
Drupal\oe_webtools_laco_service\StackMiddleware\LacoServiceMiddlewareDrupal10->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

This is because when the user visits the front-page the route gets resolved to an empty url causing this error.

The views config shipped in the config/optional/views.view.aggregator_rss_feed.yml contains the path, so this is a mistake in the update path only.

Steps to reproduce

Update from v2.0.2 to v2.1.0.
Visit front-page.

Proposed resolution

Fix the update path, however, it was released already, so beside fixing the update path, we need to add a new update path to fix broken RSS views display path to the correct one. After this, issue a 2.1.1 patch release.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium joevagyok

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

Comments & Activities

Production build 0.71.5 2024