Project

General

Profile

Actions

Bug #101387

open

Impossible to set meta tag "robots" from within uncached extbase controller action (using the MetaTag API)

Added by Jan Kornblum 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
SEO
Target version:
-
Start date:
2023-07-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
seo, meta, tag, robots, api
Complexity:
Is Regression:
Sprint Focus:

Description

Meta tags "keywords" and "description" can be set from within an uncached extbase controller action using the MetaTag API as follows:

$metaTagRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class);
$metaTagRegistry->getManagerForProperty('keywords')->addProperty('keywords', $keywords);
$metaTagRegistry->getManagerForProperty('description')->addProperty('description', $description);

But it is not possible to set meta tag "robots" using the same way:

$metaTagRegistry = GeneralUtility::makeInstance(MetaTagManagerRegistry::class);
$metaTagRegistry->getManagerForProperty('robots')->addProperty('robots', $robots);

It seems that "robots" can only be set from within a cached action. This should be fixed to be able to modify "robots" even if plugin is uncached.

Actions #1

Updated by Jan Kornblum 10 months ago

  • Description updated (diff)
Actions

Also available in: Atom PDF