Redirect module incorrectly normalizes renderer urls

Created on 5 January 2023, over 1 year ago
Updated 2 February 2023, over 1 year ago

I've run into an issue when the Redirect module is enabled.

To reproduce you can use the basic setup outline here: https://www.drupal.org/project/lupus_decoupled/issues/3323770#comment-14... πŸ“Œ Add a ddev and gitpod enabled project template Fixed

As soon as you enable the redirect module the front end no longer works because the redirect tries to normalize the URL. You can get around this by turning off "Enforce clean and canonical URLs." here: /admin/config/search/redirect/settings but that's a useful thing so it's not a great fix.

The result is if you go to for example https://lupus-nuxt.ddev.site/my-article it redirects you to https://lupus-decoupled.ddev.site/my-article?_content_format=markup this happens because in RouteNormalizerRequestSubscriber::onKernelRequestRedirect() the $redirect_uri does not match $original_uri here https://git.drupalcode.org/project/redirect/-/blob/8.x-1.x/src/EventSubs...

The Redirect module however does allow you to say "don't normalize" using _disable_route_normalizer so I've created a patch for CustomElementsRequestSubscriber that does this.

πŸ› Bug report
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Dan.Ashdown

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.

Production build 0.69.0 2024