Issue Bug Closed

#87683TitleTagProvider always get the cached entry

Guido Schmechel 02/10/19, 22:10 updated 12/23/19, 22:48

Description

Given scenario:
I have a searchresult page (e.g. UID 42). The post requests variables are used for generating title tag and meta description. There is a custom TitleTagProvider which deliver a custom title, e.g. “Hello world 123” or if another search is correct “Hello world 456”

Btw: The searchresultAction is uncached.

Output:
Case 1: “Hello world 123“
Case 2: “Hello world 123”

Expected Result:
Case 1: “Hello world 123“
Case 2: “Hello world 456”

Problem:
TYPO3 saves title Tag, also custom Provider, in typo3/sysext/core/Classes/PageTitle/PageTitleProviderManager.php $cacheIdentifier. It never looks for the content of the titleTag.

$cacheIdentifier =  $this->getTypoScriptFrontendController()->newHash . '-titleTag-' . $provider;

Possible solution:
Integrate (hashed?) titleTag content in the cacheIdentifier.

https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/PageTitle/PageTitleProviderManager.php#L69

Same problem exists for the MetaTags.

Reviews 1