Problem/Motivation
PathMatcher::isFrontPage does not work with aliased paths, causing the front page path to not redirect to the root path if an aliased path is used. Internal paths like /node/1 work fine.
- With /homepage (path alias) as front page, visiting / redirects to /homepage
- With /node/1 as front page, visiting / does not redirect (this is the correct behavior)
The site configuration form makes it look like the front path is the path alias, but in reality the /node/1 path is stored in system.site config. This creates a hard dependency between site content and site configuration, something that's not desirable in modern workflows.
Steps to reproduce
- Create a page node with alias /homepage
- Configure the front page path to be /homepage
- Visiting the front page will result in the /homepage path, instead of the root path
Proposed resolution
Change PathMatcher::isFrontPage to check both internal and aliased paths.
Remaining tasks