Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] Avoid
NullSite
in Request
object setup in RedirectService
Redirects can match even if no SiteConfiguration could be determined for the current request and a `NullSite` has been added as request attribute. In this case, the `RedirectService` already resolves a SiteConfiguration for the matched redirect. Bootstrapping a `TypoScriptFrontendController` is done using the resolved SiteConfiguration, still using the NullSite in the request for id determination and loading TypoScript. In cases where no real `sys_template` records exists, for example when `b13/bolt` is used to provide fake rows, it is important to avoid NullSite. This change uses the redirect target based resolved site in case the request does not contain a valid site object. Prepared test from #103555 is enabled now to guard this case for the future. Note: TYPO3 v13 recieved quite some refactoring in the Middleware, TSFE and TypoScript loading order a long with a factory and fixed this already. This is a simple solution for TYPO3 v12. Resolves: #103395 Related: #103555 Releases: 12.4 Change-Id: If3d3003c8af1799e19937328c00fedb7b32562c7 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83701 Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: core-ci <typo3@b13.com> Tested-by: Andreas Kienast <a.fernandez@scripting-base.de> Reviewed-by: Andreas Kienast <a.fernandez@scripting-base.de> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Stefan Bürk <stefan@buerk.tech>
- Loading branch information