Issue Task Closed

#91140Improve fake Frontends in Core

Markus Klein 04/20/20, 11:24 updated 11/17/26, 20:56

Description

The Core creates a dummy TSFE object in various places and uses mostly \stdClass for this.
On the other hand the Core relies on $GLOBALS['TSFE'] being actually of type TypoScriptFrontendController in everywhere.

It should be considered to refactor these fake TSFE implementation to either a central service that takes care of creating a valid “shim”, or
@TypoScriptFrontendController@ should be refactored to maybe a class hierarchy where sort of a base-class can be used for “fake TSFE“s.

Currently fake TSFEs are used in:

  • \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility::simulateFrontendEnvironment
  • \TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper::simulateFrontendEnvironment
  • \TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlViewHelper::simulateFrontendEnvironment
  • (\TYPO3\CMS\Redirects\Service\RedirectService::bootFrontendController this one uses the real class)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 9

  1. Benni Mack commented and changed status Accepted Closed <span data-processor="relativetime" data-value="2026-11-13T09:30:35+00:00" > 11/13/26, 09:30 </span>

    No need to fake frontend in core anymore, TSFE is gone :)

  2. Markus Klein commented <span data-processor="relativetime" data-value="2026-11-17T10:01:57+00:00" > 11/17/26, 10:01 </span>

    I want to be precise about this, as the last comment is not quite correct.

    Core still has fake frontend in TYPO3\CMS\Redirects\Service\RedirectService, but TSFE is not a topic anymore.

  3. Benni Mack commented <span data-processor="relativetime" data-value="2026-11-17T10:18:26+00:00" > 11/17/26, 10:18 </span>

    Markus Klein wrote in #note-7:
    > I want to be precise about this, as the last comment is not quite correct.
    >
    > Core still has fake frontend in TYPO3\CMS\Redirects\Service\RedirectService, but TSFE is not a topic anymore.

    That is correct. We could even consider that we want a frontend-fake-subrequest completely (which we have in TF), but that’d be a completely separate job (and ticket) IMHO

  4. Markus Klein commented <span data-processor="relativetime" data-value="2026-11-17T20:56:40+00:00" > 11/17/26, 20:56 </span>

    Sure. Just wanted to have this correct here, so that AI has a complete picture, when it uses this ticket :-)