Bug #86492
closedstdWrap on config.additionalHeaders is broken for (fully) cached pages.
100%
Description
The feature to use stdWrap for additionalHeaders was introduced in v9 development cycle: https://review.typo3.org/c/50142/
It seems this is broken since the initial commit (and is still in master).
Suppose using the following TypoScript (as suggested in the documentation):
config.additionalHeaders { 10 { # The header string header = X-TYPO3-foo: header.dataWrap = |{page:uid} } }
Both the original commit 2124bba49f68f5c35705c5c499abe6a0ee95a6cf and current master result in an Exception for a page that is read from cache because TypoScriptFrontendController->cObj
is not initialized:
? $this->cObj->stdWrap(trim($header), $options['header.']) Oops, an error occurred! Call to a member function stdWrap() on string.
cObj is initialized in TSFE::newCObj, which is called by TSFE::preparePageContentGeneration
, which itself is only called if the page is uncached or rendered initially (for good reasons).
I'm not sure whether we should revert this feature, instead of fixing this and implcitly allowing uncached stuff to be executed (through stdWrap) for a fully cached page. Things like these may be better handled by middlewares.
Updated by Markus Klein about 6 years ago
- Related to Feature #23494: config.additionalHeaders - add stdWrap added
Updated by Markus Klein about 6 years ago
- Status changed from New to Accepted
- Assignee set to Markus Klein
- Priority changed from Should have to Must have
- Target version set to 9 LTS
The feature will be reverted as decided by Benni and me.
Updated by Gerrit Code Review about 6 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Gerrit Code Review about 6 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58517
Updated by Markus Klein about 6 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a5e3a154df142d3e9bc768e217212b03af40939b.