RouteNormalizerRequestSubscriber redirects away from the front page when it's set to an alias

Created on 21 December 2024, 2 months ago

Problem/Motivation

See 📌 Front page always redirects to /home Active and 🐛 Updating page.front Active .

If you set the front page to point to an alias (only possible via manually updating configuration, or as in Drupal CMS's case, using a recipe, RouteNormalizerRequestSubscriber will redirect away from the front page to the route.

I think the event subscriber could check for '/' and return early in that case, so that there's no redirect.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom catch

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

Comments & Activities

  • Issue created by @catch
  • 🇨🇭Switzerland berdir Switzerland

    Checking on / might not be as straight-forward as you think.

    Consider language prefixes for example. We remove them in some places, like the current path service. But we also trim other things, like an index.php/ prefix that we explicitly check for an remove later on. I would expect that foo.com/index.php will also have a path of just / but we do want to trigger a redirect for that. But we don't want to do trigger one for foo.com/en.

Production build 0.71.5 2024