Project

General

Profile

Actions

Bug #62080

closed

$GLOBALS['TSFE']->page['title'] in USER doesn't work anymore for cached pages

Added by Julian Klassen over 9 years ago. Updated over 5 years ago.

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

100%

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

Description

Since commit 1263413f305a459080b895f762740bbfaeaca686 which fixed issue #54467, you can't correctly set the page title in a USER plugin anymore. The new call to regeneratePageTitle() unconditionally sets the page title based on the values of $TSFE->altPageTitle / page['title'] at the time of the request.

If the page title gets set from a USER plugin, those values are only correctly set for requests that aren't answered from the cache. All later requests that are answered from the cache don't execute the USER plugin, and therefore the new call to regenerateTitle() sets the page title to its "regular" value, overriding the value initially set by the USER plugin.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #54467: $GLOBALS['TSFE']->altPageTitle doesn't work any more in extensionsClosed2013-12-17

Actions
Related to TYPO3 Core - Bug #66499: double site titleClosedMarkus Klein2015-04-20

Actions
Has duplicate TYPO3 Core - Bug #65832: page title of cached plugin (like news) is lost on partially cached pagesClosed2015-03-18

Actions
Actions #1

Updated by Markus Klein about 9 years ago

  • Category set to Frontend
  • Status changed from New to Accepted
  • Assignee set to Markus Klein
  • Priority changed from Should have to Must have
  • Target version set to next-patchlevel
  • Complexity set to hard
  • Is Regression changed from No to Yes
Actions #2

Updated by Markus Klein about 9 years ago

This is really a tough thing.

Considering a partially cached page, we have the situation that the cached page parts might be having a USER plugin which sets a custom page title. So the content coming from the cache (in particular the restored PageRenderer) already contains the valid title. The subsequent call to PageGenerator::generatePageTitle() will overwrite those valid values with the "fresh" data from TSFE. But the data of TSFE are not preset with the data from the restored PageRenderer, hence the title is overridden.

If we remove the call to PageGenerator::generatePageTitle() would fix the issue, but then USER_INT plugins will not be able to set the page title, so we would be back to issue #54467.

The only solution can therefore be to either preset the TSFE data accordingly, or to double-buffer write actions to TSFE. Second is not possible, since the members are public and no setters are in place.

Actions #3

Updated by Gerrit Code Review about 9 years ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37938

Actions #4

Updated by Markus Klein about 9 years ago

  • Status changed from Under Review to Closed

push went to wrong ticket

Actions #5

Updated by Markus Klein about 9 years ago

  • Status changed from Closed to Under Review

code to reproduce can be found in #65832

Actions #6

Updated by Gerrit Code Review about 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38264

Actions #7

Updated by Markus Klein about 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF