Bug #94905
closedFE requests to /index.php are broken without providing id get parameter, if no pageTypeSuffix routeEnhancer is configured
100%
Description
Affected Typo3 Versions: master, 10.4.20 LTS, 9.5.30 LTS
Requests to /index.php are not working anymore, if no ?id= parameter is provided since releases today (master, 10.4.20 LTS, 9.5.30 LTS ).
This is related to the patch(es) for https://forge.typo3.org/issues/94537.
If a routeEnhancer configuration with `.php` as default is configured, it works. Without it it is broken.
routeEnhancers:
PageTypeSuffix:
type: PageType
default: .php
index: index
map: { }
The reason is, that replaceing of the scriptName in the url.
// TYPO3\CMS\Core\Routing\PageRouter::matchRequest()
// doing this
$urlPath = ltrim(str_replace('/' . $scriptName, '', '/' . ltrim($urlPath, '/')), '/');
// instead of
$urlPath = str_replace('/' . $scriptName, '', $urlPath);
Would fix this and the related issue both, with and withoud a pageTypeSuffix configuration in routing. Anyway .. maybe a str_replace is to heavay, eventually it should only replace it at the starting ? Maybe doing upper as first fix and thinking about better/broader solution ?
Updated by Simon Gilli over 3 years ago
- Related to Bug #94537: Page could not be resolved if page slug ending in index and using PageSuffix RouteEnhancer to add .php suffix to all pages of a site. added
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Stefan Bürk over 3 years ago
- Related to Bug #88028: index.php results in 404 added
Updated by Stefan Bürk over 3 years ago
- Category set to Site Handling, Site Sets & Routing
- Assignee set to Stefan Bürk
- Complexity set to medium
Investigated this further/deeper
Benny Mack originally added the "block" for that scriptName replacement, to fix the call of "index.php" without "id" and "type" parameter back then when it was introduced in v9.
See: https://forge.typo3.org/issues/88028
Unluckily, there were no tests added to "cover" this, and so my patch for fixing another issue from me broke this again, undetected through tests and manually reviews / tests.
See: https://forge.typo3.org/issues/94537
Anyway, after adding the original patch, some noted that he had issue if it was in a "subfolder". See: https://forge.typo3.org/issues/88028#note-8
So I changed my "original" bugfix for this now back to "WIP", after these observations. I have added tests which was missing to cover the the original issue,
but now I (we) need to add some more tests to test this for "subpaths" installations to (if possible) - here I have to dig deeper in, maybe "needed hand" for this tests
would be nice (hints/notes how to accomplish this). But would not fix it without these tests.
Having these tests in place, the "solution" have to be tested and adjustet to cover all cases.
Updated by Gerrit Code Review over 3 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review over 3 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review over 3 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Andreas Krämer over 3 years ago
I just discovered this problem, too. If it helps someone, "/index.php?type=123" does not work (anymore), but "/?type=123" does.
Updated by Stefan Bürk over 3 years ago
Andreas Krämer wrote in #note-10:
I just discovered this problem, too. If it helps someone, "/index.php?type=123" does not work (anymore), but "/?type=123" does.
Thanks, yes .. that constellation was also the first report and the reson we/I digged further into it.
Will be fixed with patch then. Anyway thanx for test data (better duplicated than none ).
For that there was no tests in place, fix & tests already in the patch sets (and other things).
Updated by Gerrit Code Review over 3 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review over 3 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review about 3 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review about 3 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review about 3 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review about 3 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review about 3 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review about 3 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 16 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 17 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 18 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 19 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 20 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640
Updated by Gerrit Code Review almost 3 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/72880
Updated by Stefan Bürk almost 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset af512dbd8e935dd33730fb0ce4be309eb370ceeb.