Commit af512dbd authored by Committed by Benni MackBrowse files
[BUGFIX] Resolving page slug ending with index and type suffix '.php'
If a page slug ends with 'index' and site has a routing configuration with a PageTypeSuffix with index and suffix '.php' as default suffix, route resolving cuts 'index.php' from the uri, ending with a slug without index in it and thus not resolving the page and displaying 404 page. The reason for this is the code fragment which strips the document root from the uri as a cleanup for some systems, and fixes an issue for calling id/type parameters with index.php (main entry point), which has been added as a bugfix in v9 with #88028. There was a first attempt to fix this page resolving issue with #94537, which has been a regression and reverted with issue #94968. To ensure everything works and regression is covered before a new patch, there has been two patches with #95096 and #95362. After the regression there has been a really deep analysis, to get all puzzle pieces together over the time, which ended in the pre-patches and finally in this patch. The stripping of the document root has been implemented to late in the resolving chain to solve #88028, thus the followup fixes interferred with the resolving concept. This patch moves this stripping from the page-resolving point some steps early to the site-resolving step, and doing the stripping only on the left site of the uri and avoiding a generall str_replace(), thus fixing past issues and the current issue in the correct place. Furthermore tests for this issue are (re)added with this patch, as they were removed with the revert. Resolves: #94905 Related: #95096 Related: #95362 Related: #94537 Related: #94968 Related: #88028 Releases: main, 11.5 Change-Id: I2e10689893047e2d8f19057dfac2fb3b5f0bdcde Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70640 Tested-by: core-ci <email@example.com> Tested-by: Oliver Bartsch <firstname.lastname@example.org> Tested-by: Benni Mack <email@example.com> Reviewed-by: Oliver Bartsch <firstname.lastname@example.org> Reviewed-by: Benni Mack <email@example.com>