Actions
Bug #98362
openAbstractMetaTagManager: $replace is useless on metatags with "allowMultipleOccurrences" set
Status:
New
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2022-09-16
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
metatags og:image
Complexity:
easy
Is Regression:
Sprint Focus:
Description
Tried to override metatags from page settings in a plugin on this page.
Failed on og:image, always both, the page og_image and the image from my plugin are rendered, even if $replace = true is set.
TYPO3 Versions 10 & 11
lines 117 and 150 in TYPO3\CMS\Core\MetaTag\AbstractMetaTagManager
The code does not allow to replace metatags with "allowMultipleOccurrences" set
if ($replace === true) {
$this->removeProperty($property, $type);
$this->properties[$property][] = ['content' => $content, 'subProperties' => $subPropertiesArray];
return;
}
if (isset($this->handledProperties[$property]['allowMultipleOccurrences']) &&
(bool)$this->handledProperties[$property]['allowMultipleOccurrences']
) {
$this->properties[$property][] = ['content' => $content, 'subProperties' => $subPropertiesArray];
}
Actions