#91233Cached page title is overwritten on pages with *_INT objects
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\TypoScriptFrontendControlleris 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