Project

General

Profile

Actions

Bug #86492

closed

stdWrap on config.additionalHeaders is broken for (fully) cached pages.

Added by Benjamin Franzke over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Frontend
Target version:
Start date:
2018-10-01
Due date:
% Done:

100%

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

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #23494: config.additionalHeaders - add stdWrapRejected2014-02-25

Actions
Actions #1

Updated by Markus Klein over 5 years ago

  • Related to Feature #23494: config.additionalHeaders - add stdWrap added
Actions #2

Updated by Markus Klein over 5 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.

Actions #3

Updated by Gerrit Code Review over 5 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

Actions #4

Updated by Gerrit Code Review over 5 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

Actions #5

Updated by Gerrit Code Review over 5 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

Actions #6

Updated by Gerrit Code Review over 5 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

Actions #7

Updated by Gerrit Code Review over 5 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

Actions #8

Updated by Gerrit Code Review over 5 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

Actions #9

Updated by Gerrit Code Review over 5 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

Actions #10

Updated by Gerrit Code Review over 5 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

Actions #11

Updated by Gerrit Code Review over 5 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

Actions #12

Updated by Gerrit Code Review over 5 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

Actions #13

Updated by Markus Klein over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF