#104518Page resolution for additional language might fail for certain slugs
Description
If the entrypoint of the site configuration contains the name of a page slug in a language path, the page might not be found.
Steps to reproduce the bug:- create a site configuration with the entry point https://example.com/xyz
- entrypoint for the default language should be / (I have not tested it with other paths)
- entrypoint for the additional language should be /en/ (any other should work to, but this I tested)
- create the page “xyz” in the root page for the site configuration, the page should be available at https://example.com/xyz/xyz
- add a language variant for the page, which should be available at https://example.com/xyz/en/xyz
- if you try to access https://example.com/xyz/en/xyz you should get a 404 error
I am pretty sure the error is int the sorting in `TYPO3\CMS\Core\Routing\BestUrlMatcher::matchCollection`, as the relative slug `/xyz` is matched against the full path of the url
I tested this for version 11.5.38 but is probably in version 12 and 13, too, as the code seems the same
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 2
-
Benni Mack commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-09T10:07:55+00:00" > 11/09/26, 10:07 </span> -
Benni Mack changed Related to #109259 <span data-processor="relativetime" data-value="2026-11-09T10:08:02+00:00" > 11/09/26, 10:08 </span>
Fixed by #109259 (c6b1ca1b9ae on main, also in 14.3 and 13.4): MatchedRoute::getPathMatchScore() used strpos() to locate the tail, so a slug equal to the site base segment let the default language route win. With strrpos() the language route is preferred. Verified with a functional test using the setup from the description: /xyz/en/xyz resolves to the translated page on main and returns 404 with the old code. Closing as resolved.