Project

General

Profile

Actions

Bug #87683

closed

TitleTagProvider always get the cached entry

Added by Guido Schmechel about 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Category:
SEO
Target version:
-
Start date:
2019-02-10
Due date:
% Done:

0%

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

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.


Related issues 2 (0 open2 closed)

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

Actions
Related to TYPO3 Core - Bug #91233: Cached page title is overwritten on pages with *_INT objectsClosed2020-04-29

Actions
Actions #1

Updated by Richard Haeser about 5 years ago

  • Category set to SEO
  • Assignee set to Richard Haeser
Actions #2

Updated by Gerrit Code Review about 5 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

Actions #3

Updated by Gerrit Code Review about 5 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

Actions #4

Updated by Richard Haeser about 5 years ago

  • Status changed from Under Review to Needs Feedback

Is the title "Hello world 456" set by an uncached element?

Actions #5

Updated by Guido Schmechel about 5 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
        }
    }
'));

Actions #6

Updated by Richard Haeser about 5 years ago

  • Status changed from Needs Feedback to New
Actions #7

Updated by Guido Schmechel about 5 years ago

  • Related to Bug #88179: Meta tags and page title are unnecessarily cached in separate cache entries added
Actions #8

Updated by Richard Haeser almost 5 years ago

  • Status changed from New to Resolved

This is fixed with the release of v9.5.8

Actions #9

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #10

Updated by Helmut Hummel almost 4 years ago

  • Related to Bug #91233: Cached page title is overwritten on pages with *_INT objects added
Actions

Also available in: Atom PDF