Bug #87683
closedTitleTagProvider always get the cached entry
0%
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.
Same problem exists for the MetaTags.
Updated by Richard Haeser almost 6 years ago
- Category set to SEO
- Assignee set to Richard Haeser
Updated by Gerrit Code Review almost 6 years ago
- Status changed from New 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/59684
Updated by Gerrit Code Review almost 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/59684
Updated by Richard Haeser almost 6 years ago
- Status changed from Under Review to Needs Feedback
Is the title "Hello world 456" set by an uncached element?
Updated by Guido Schmechel almost 6 years ago
I have an uncached searchAction. It fetches two values from the database and then does that here:
$title = $postal->getPostal() . ' ' . $postal->getCity();
$titleProvider = GeneralUtility::makeInstance(PoiTitleProvider::class);
$titleProvider->setTitle($title);
PoiTitleProvider is just a simple class with a title setter.
Registration
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(trim('
config.pageTitleProviders {
own {
provider = Ayacoo\AyacooPoi\PageTitle\PoiTitleProvider
before = record
after = altPageTitle
}
}
'));
Updated by Richard Haeser over 5 years ago
- Status changed from Needs Feedback to New
Updated by Guido Schmechel over 5 years ago
- Related to Bug #88179: Meta tags and page title are unnecessarily cached in separate cache entries added
Updated by Richard Haeser over 5 years ago
- Status changed from New to Resolved
This is fixed with the release of v9.5.8
Updated by Helmut Hummel over 4 years ago
- Related to Bug #91233: Cached page title is overwritten on pages with *_INT objects added