Actions
Bug #102018
openURL suffix is not taken into account in TYPO3\CMS\Core\Routing\PageSlugCandidateProvider::getCandidatesForPath()
Status:
New
Priority:
Should have
Assignee:
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2023-09-22
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
I am updating a multi domain + multi language website from TYPO3 8 to 11.
The language fallbacks are set up properly: if a page is not translated the fallback (language 0) should be the candidate to show.
Nevertheless a 404 is thrown.
I dived into the core code and found out, that the variable $slugCandidate did not use the configured suffix /
It is even removed. In TYPO 12 the behaviour is the same as I can see.
The code in TYPO3\CMS\Core\Routing\PageSlugCandidateProvider::getCandidatesForPath():
$slugCandidate = '/' . trim($candidate['slug'], '/'); .. if ($urlPath === $slugCandidate) {
My config.yaml:
languages: - .. languageId: 1 fallbackType: fallback fallbacks: '0' .. routeEnhancers: PageTypeSuffix: type: PageType default: / suffix: / index: '' map: /: 0 ..
If I add the suffix to the $slugCandidate quick & dirty, the behaviour is as expected and I can move forward with the next challenges.
$slugCandidate = '/' . trim($candidate['slug'], '/') . '/';
Thanks for fixing this.
Actions