#111022Provide a public API for frontend rendering outside a web request
Description
Many projects send notification mails or render content from a CLI
command, a scheduler task, or a Messenger handler. These contexts have
no frontend request. TYPO3 has no public, stable way to get a complete
frontend rendering context for a given site, language, and page there,
including the frontend TypoScript.
Affected versions: 13.4, 14.3, and main. Tested on 14.3.7; the code
paths are the same on main.
What works today with a simulated request
The smallest request that works for FluidEmail is
new ServerRequest($site->getBase()) with the attributes
applicationType (REQUESTTYPE_FE), site, and normalizedParams
(NormalizedParams::createFromRequest()). With it, f:link.page,
f:uri.page, and f:link.typolink with absolute=“1” create correct
absolute URLs.
Since 14.0, a request without normalizedParams makes
DefaultSystemResourcePublisher throw a TypeError as soon as the
default email layout renders its logo.
What does not work
Everything that needs frontend TypoScript fails:
- f:format.html throws “Invoked ContentObjectRenderer::parseFunc
without any configuration” (1641989097), because lib.parseFunc_RTE
is not available. - Without f:format.html, RTE text keeps links such as t3://page?uid=27
unresolved. - f:transform.html needs $GLOBALS[‘TYPO3_REQUEST’] (see the @todo in
LinkFactory::createUri()). With it, the result has only relative
URLs, because config.forceAbsoluteUrls is frontend TypoScript.
Absolute links in mails by default are requested in #102362.
Current workaround
The only way to build frontend TypoScript outside the frontend is
\TYPO3\CMS\Core\TypoScript\FrontendTypoScriptFactory. It is marked
@internal (“Methods signatures and detail implementations are still
subject to change”). The Core uses it outside the frontend itself, in
EXT:extbase BackendConfigurationManager and EXT:redirects
RedirectService. Extensions cannot rely on it.
- asked for TypoScript in a command and was closed with a
reference to FrontendTypoScriptFactory, so this need is still open.
Request
A public API that creates a frontend rendering context for a site, a
language, and a page outside a web request. The context must contain
the frontend TypoScript, so that FluidEmail, parseFunc, and typolink
work as in a frontend request. This issue does not propose the shape
of the API.
Found while documenting how to send FluidEmail from a command:
https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-CoreApi/pull/7229
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 5
-
Lina Wolf changed description <span data-processor="relativetime" data-value="2026-10-11T16:47:13+00:00" > 10/11/26, 16:47 </span>
-
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2026-10-12T19:50:04+00:00" > 10/12/26, 19:50 </span> -
Georg Ringer changed Duplicates #91140 <span data-processor="relativetime" data-value="2026-10-12T19:50:16+00:00" > 10/12/26, 19:50 </span>
-
Lina Wolf commented <span data-processor="relativetime" data-value="2026-10-17T05:42:55+00:00" > 10/17/26, 05:42 </span>
https://packagist.org/packages/reelworx/t3-fakefrontend itself has to use internal API to reach its goal. So the fact that this is currently not dooable without using internal API holds true.
As you cannot properly send an Email form the CLI currently without using internal API I would say it is a bug that this is internal API and there is no legal way to get it.
dummy TSFE objects as mentioned in #91140 and `$GLOBALS[‘TSFE’]` dont even exist anymore. Therefore I would suggest to close https://forge.typo3.org/issues/91140 instead.
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-11-02T16:23:05+00:00" > 11/02/26, 16:23 </span>closing the latest issue as the original one is still valid – yes tsfe is not existing anymore but just because the issue is so old
sounds like a duplicate of #91140, in the meantime use e.g. https://packagist.org/packages/reelworx/t3-fakefrontend
closing the issue?