Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call hasSetup before getSetupArray #174

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions Documentation/Exceptions/1666513645.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,43 @@ TYPO3 Exception 1666513645


..
TYPO3 [version] - [date of report]
==================================
TYPO3 13.4 - 30th December 2024
================================

Installation Overview
---------------------

Provide as much information about your installation of TYPO3
including its version number and any other information that
you think will be relevant to other users who encounter the same issue.
It uses the extension tslib_fetce 0.9.2 which uses the FrontendTce class Middleware.

The Issue
---------

Detail each of the steps or changes that took place leading up to the
issue occurring.
RuntimeException

Setup array has not been initialized. This happens in cached Frontend scope where full TypoScript is not needed by the system.

Solution
--------

Did you resolve the issue? List the steps or changes made that resolved the
issue.
Call the method hasSetup before hasSetup.

.. code-block:: php

public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$tsfe = $this->getTypoScriptFrontendController();
$frontendTypoScript = $request->getAttribute('frontend.typoscript');
if ($frontendTypoScript->hasSetup()) {
$typoScriptSetupArray = $frontendTypoScript->getSetupArray();
...
}

/**
* @return TypoScriptFrontendController
*/
protected function getTypoScriptFrontendController(): TypoScriptFrontendController
{
return $GLOBALS['TSFE'];
}


Loading