Project

General

Profile

Actions

Bug #91233

closed

Cached page title is overwritten on pages with *_INT objects

Added by Jiří Štefl almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2020-04-29
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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:
  1. 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().
  2. Insert some none-cacheable content.
  3. When the page is cached, the page title from plugin's PageTitleProvider is never displayed.
Problem:
  • If the page has some none-cacheable content, then $controller->INTincScript() is called in TYPO3\CMS\Frontend\Http\RequestHandler->handle().
  • In TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController is then called the generatePageTitle() 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


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #91316: MetaTagManagerRegistry instance not unique in uncached pluginsClosedBenjamin Franzke2020-05-06

Actions
Related to TYPO3 Core - Bug #86234: Missing Meta Tags on Pages with *_INT objectsClosedRichard Haeser2018-09-12

Actions
Related to TYPO3 Core - Bug #87683: TitleTagProvider always get the cached entryClosedRichard Haeser2019-02-10

Actions
Related to TYPO3 Core - Bug #88179: Meta tags and page title are unnecessarily cached in separate cache entriesClosed2019-04-19

Actions
Actions #1

Updated by Georg Ringer almost 4 years ago

  • Related to Bug #91316: MetaTagManagerRegistry instance not unique in uncached plugins added
Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

Updated by Helmut Hummel almost 4 years ago

  • Related to Bug #86234: Missing Meta Tags on Pages with *_INT objects added
Actions #7

Updated by Helmut Hummel almost 4 years ago

  • Related to Bug #87683: TitleTagProvider always get the cached entry added
Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

Updated by Helmut Hummel almost 4 years ago

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

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
Actions #13

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF