Review 12.4 Merged

83701[BUGFIX] Avoid `NullSite` in `Request` object setup in RedirectService

Stefan Bürk CR +2 V +2 Easy +22 −9 updated 04/08/24, 13:52

Commit message

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.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 79

  1. Stefan Bürk uploaded patch set 1 04/08/24, 09:22

  2. Stefan Bürk updated the commit message in patch set 2 04/08/24, 09:24

  3. core-ci voted on patch set 1 V +1 04/08/24, 09:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55546

  4. core-ci voted on patch set 2 V +1 04/08/24, 09:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/55547

  5. Christian Kuhn voted on patch set 2 CR +1 V +1 04/08/24, 09:51

  6. Andreas Kienast voted on patch set 2 CR +1 04/08/24, 10:05

  7. Andreas Kienast voted on patch set 2 V +1 04/08/24, 13:52

  8. Stefan Bürk voted on patch set 2 CR +2 V +2 04/08/24, 13:52

  9. Stefan Bürk merged patch set 3 04/08/24, 13:52