Project

General

Profile

Actions

Bug #99417

closed

No way to get frontend.typoscript (TypoScript setup) in Middleware when page was cached

Added by David Bascom almost 2 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Start date:
2022-12-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
hard
Is Regression:
Sprint Focus:

Description

Currently (Version 12.1) there seems to be no possibilty to get the Typoscript Setup in a Middleware, if the page was previously cached.

This problem is probably related to the changes made in
https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.1/Feature-98914-TypoScriptAsRequestAttribute.html

How to reproduce:

- write a Middleware that tries to access the TypoScript-Array using `$request->getAttribute('frontend.typoscript')->getSetupArray()` and hook it in at a place, where the Frontend is usually initialized (e.g. after `typo3/cms-frontend/shortcut-and-mountpoint-redirect`)
- Clear the cache in the backend
- First page load works
- Second page load (from cache) will result in the Fatal error "Setup array has not been initialized. This happens in cached Frontend scope where full TypoScript is not needed by the system."

Many of our extensions rely on getting settings from TypoScript to process the request (e.g. EXT:nnrestapi).
Currently we have no idea how to solve this problem other than caching the complete TypoScript setup ourselves or deactiving the frontend cache completely.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Feature #97816: New TypoScript parserClosed2022-06-27

Actions
Related to TYPO3 Core - Task #98659: More effective FE TypoScript cache layerClosed2022-10-19

Actions
Related to TYPO3 Core - Task #101031: Remove deprecated code in extbase ConfigurationManagerClosed2023-06-13

Actions
Actions

Also available in: Atom PDF