Bug #102892


RuntimeException when using redirects with record link targets

Added by Christian Gebing 4 months ago. Updated about 1 month ago.

Should have
Redirect Handling
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


I get the following exception for redirects with record links targets after the site is stored in the cache:

(1/1) #1666513645 RuntimeException

Setup array has not been initialized. This happens in cached Frontend scope where full TypoScript is not needed by the system.
Steps to reproduce:
  1. Flush caches via the maintanance tool
  2. Add a new redirect with a record link target (e.g. t3://record?identifier=example&uid=1)
  3. Follow the redirect
  4. Open the start page or any other page on the current site
  5. Attempt to follow the redirect again

Tested on a minimal TYPO3 ddev setup:


2024-01-22_18-57.png (66.3 KB) 2024-01-22_18-57.png Redirect Christian Gebing, 2024-01-22 17:58
Actions #1

Updated by Stefan Bürk 4 months ago

  • Assignee set to Stefan Bürk
Actions #2

Updated by Armin Vieweg about 2 months ago

I can reconstruct this issue.
It disappears, when clearing the frontend cache, then the redirects work as expected.

But as soon as I call the front page (the first page in rootLine, which contains the TypoScript setup) and this page gets cached, the redirect break, with the exception from above.

I tried several TYPO3 versions. This issue seems to occure since 12.4.2. In 12.4.1 I am not able to reconstruct the issue, by calling the first page in rootLine (the front page). There, the redirections always work.

Actions #3

Updated by Armin Vieweg about 2 months ago

A quick fix is, to disable caching on the first page in rootLine, with e.g.

# Quick fix for
[traverse(page, "uid") == 1]
config.no_cache = 1

Absolutely not ideal or recommended, but this solves the issue, which only occures when the first page is being cached.

Actions #4

Updated by Armin Vieweg about 2 months ago

I also found the commit, which causes the issue:

The issue only occures when the feature toggle "Security: frontend enforce content security policy" [security.frontend.enforceContentSecurityPolicy] is disabled.

Actions #5

Updated by Oliver Hader about 2 months ago

I don't think this is related to CSP, but more related to cached TypoScript (I might look into this during the next few days/weeks):

Actions #6

Updated by Benni Mack about 2 months ago

Some more notes:

This is related to a fully cached page not having TypoScript anymore, see another issue / bugfix which happened in adminpanel on a fully cached page:

Actions #7

Updated by Armin Vieweg about 1 month ago

@Oliver Hader So, when CSP is on the page cache does not work anymore? Sounds a little bit like that.

@Benni Mack Caching and providing the rendered Typoscript configuration, could solve this, maybe?

Or the redirect Middleware must get enabled to parse the Typoscript, when being triggered and when the target starts with "t3:".

But maybe there are other edge cases, like redirects, which require the parsed Typoscript config.


Also available in: Atom PDF