Bug #91233
closedCached page title is overwritten on pages with *_INT objects
100%
Description
When a page has USER_INT or COA_INT objects and is delivered from cache, the page title is overwritten with standard PageTitleProviders.
Steps to reproduce:- Insert plugin with cacheable action which has own PageTitleProvider. This PageTitleProvider has setter which is called from this cacheable action - e.g.
$pageTitleProvider->setTitle($detailObject->getTitle()
. - Insert some none-cacheable content.
- When the page is cached, the page title from plugin's PageTitleProvider is never displayed.
- If the page has some none-cacheable content, then
$controller->INTincScript()
is called inTYPO3\CMS\Frontend\Http\RequestHandler->handle()
. - In
TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
is then called thegeneratePageTitle()
method. - All pageTitleProviders are loaded in
TYPO3\CMS\Core\PageTitle\PageTitleProviderManager
. - Since the custom pageTitleProvider's setter is never called (because action is cached), the
getTitle()
result is empty. - If the none-cacheable content doesn't set the page title, then name of the page is taken as page title.
Possible solution:TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->generatePageTitle()
and TYPO3\CMS\Core\PageTitle\PageTitleProviderManager->getTitle()
should have some boolean argument to know when this is called. When called from TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->INTincScript()
, standard pageTitleProviders (altPageTitle, seo, record) should not be loaded again, because that result was already cached.
Related to:
https://forge.typo3.org/issues/86234
https://forge.typo3.org/issues/87683
Updated by Georg Ringer almost 4 years ago
- Related to Bug #91316: MetaTagManagerRegistry instance not unique in uncached plugins added
Updated by Rémy DANIEL almost 4 years ago
Issue also reported on stack overflow: https://stackoverflow.com/questions/61010501/problems-with-pagetitleproviders-within-in-controller-in-cached-action
Updated by Rémy DANIEL almost 4 years ago
On SO, someone wrote that the issue has been introduced in 9.5.8. [1]
A thread on Slack gives some insights about usecases that triggers the issue [2]
Affects also ext:news [3]
[1] https://stackoverflow.com/questions/61010501/problems-with-pagetitleproviders-within-in-controller-in-cached-action
[2] https://typo3.slack.com/archives/C025BQLFA/p1588067478426300
[3] https://typo3.slack.com/archives/C03TG7QJT/p1589991145358400
Updated by Gerrit Code Review almost 4 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/c/Packages/TYPO3.CMS/+/64934
Updated by Gerrit Code Review almost 4 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/c/Packages/TYPO3.CMS/+/64934
Updated by Helmut Hummel almost 4 years ago
- Related to Bug #86234: Missing Meta Tags on Pages with *_INT objects added
Updated by Helmut Hummel almost 4 years ago
- Related to Bug #87683: TitleTagProvider always get the cached entry added
Updated by Gerrit Code Review almost 4 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64972
Updated by Gerrit Code Review almost 4 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64973
Updated by Gerrit Code Review almost 4 years ago
Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64973
Updated by Helmut Hummel almost 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset db9ddb8c2eab71890299f2f04b9a6a731a597e57.
Updated by Helmut Hummel almost 4 years ago
- Related to Bug #88179: Meta tags and page title are unnecessarily cached in separate cache entries added