Project

General

Profile

Actions

Bug #91316

closed

MetaTagManagerRegistry instance not unique in uncached plugins

Added by Benjamin Franzke over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
Start date:
2020-05-06
Due date:
% Done:

100%

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

Description

Reported by Aristeidis Karavas (Apr 28th at 11:51) via Slack:
https://typo3.slack.com/archives/C025BQLFA/p1588067478426300

Why in TYPO3 v10 this won't set the meta tags in frontend?
$metaTag = $this->metaTagManagerRegistry->getManagerForProperty($key);
$metaTag->addProperty($key, $metaTagValue);
If i debug it, it sets everything right but it won't be displayed in the frontend

The reason is that the PageRenderer stores a new Singleton via GeneralUtility::setSingletonInstance in __wakeup.

That updates MetaTagManagerRegistry instances retrieved via GeneralUtility::makeInstance, but not those injected via symfony DI,
where the object will already have been generated, as it is loaded during EXT:seo/ext_localconf.php loading and GeneralUtility::makeInstance
will call the DI container.

This issues happens when the PageRenderer was serialized and is unserialized for USER_INT plugins (e.g. uncached extbase plugins).

Same applies to AssetCollector, which is serialized and unserialized as well.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #87402: Feature-79409 renderAssetsForRequest does not work for USER_INT/uncachedClosed2019-01-11

Actions
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

Also available in: Atom PDF