TYPO3 Exception 1700841298
Note
Below, the TYPO3 community may have provided additional information or solutions for this exception. However, these may or may not apply to your particular case. If you can provide more information, you should come back here and add your experience and solution steps to this issue once you have resolved it.
General TYPO3 troubleshooting tips can be found in the Troubleshooting section in the menu. You can also ask questions and receive support in the TYPO3 Questions category on talk.typo3.org.
To add your experience, click "Edit on GitHub" above and follow the "Edit on GitHub" workflow. Also check out our tip on Coding Style and reST.
Warning
Setup array has not been initialized. This happens in cached Frontend scope where full TypoScript is not needed by the system.
TYPO3 13.4.29 - 05.06.26
Installation Overview
Exception happened in a console command called via scheduler. The scheduler task is sending emails and therefore faked a frontend request:
Bootstrap::initializeBackendAuthentication();
$site = $this->siteFinder->getSiteByPageId(1);
$request = (new ServerRequest())
->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE)
->withAttribute('site', $site);
$GLOBALS['TYPO3_REQUEST'] = $request;
// ...
$email = (new FluidEmail());
// ...
$email->setRequest($GLOBALS['TYPO3_REQUEST']);
Solution
I resolved the issue by not setting the global variable and instead sending the request as parameter to the place where it is needed for the mailer:
Bootstrap::initializeBackendAuthentication();
$site = $this->siteFinder->getSiteByPageId(1);
$request = (new ServerRequest())
->withAttribute('applicationType', SystemEnvironmentBuilder::REQUESTTYPE_FE)
->withAttribute('site', $site);
// ...
$email = (new FluidEmail());
// ...
$email->setRequest($request);