Issue Bug Closed

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

Jan Kornblum 07/19/23, 08:12 updated 07/27/24, 15:06

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Jan Kornblum changed description 07/19/23, 08:13

  2. Georg Ringer commented and changed status New Closed 07/27/24, 13:46

    just tested that in v13 and works fine, therefore closing it – probably also fine in v12

  3. Jan Kornblum commented 07/27/24, 15:06

    Georg Ringer wrote in #note-2:
    > just tested that in v13 and works fine, therefore closing it – probably also fine in v12

    Thanks for your feedback.