Bug #91353

Deactivation of Hreflang Tags not possible anymore

Added by Ben Robinson 16 days ago. Updated 8 days ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


It should be possible to deactivate the generation of the hreflang tags via ...


... as described in the manual , but it does not (10.4.1).

I have tried whether disabling the canonical via the similar …

… still works: yes, it does.

It looks like ...
TYPO3_CONF_VARS > SC_OPTIONS > TYPO3\CMS\Frontend\Page\PageGenerator > generateMetaTags > hreflang
… it is out of date. I can't even find it in the configuration module.

Background of the problem:
I created a language in the sites module whose content is not yet finished. This language version should be accessible to some people involved and who know the link, but for now there should not be an <link rel="alternate" hreflang="lang_code" href="url_of_page"/> entry. If I deactivate "Visible in Frontend", it unfortunately cannot be accessed at all, not even via the view-module in the backend:
Page Not Found The page did not exist or was inaccessible. Reason: Page is not available in the requested language
Therefore I thought it would be the easiest workaround to deactivate the complete hreflang-tag generation.


#1 Updated by Georg Ringer 14 days ago

  • Category changed from Link Handling, Site Handling & Routing to SEO
  • Assignee set to Richard Haeser

#2 Updated by Ben Robinson 13 days ago

Addendum: my suggestion would be to set up a checkbox "exclude from hreflang" in the site management for the languages. That way you could control this specifically for individual languages and you don't have to deactivate a language completely if it is still under construction on the one hand, but on the other hand should be made available to decision makers without BE access. The global unset for hreflang would then also no longer be absolutely necessary.

What I also don't like about a complete deactivation of a language: if for each language a separate domain is used and a language is hidden for the time being, then you only have a preview if you are logged in at the same time under the same domain in the BE. If you call the domain by mistake without being logged into the BE, a 404 is created. If the error handling is set to "show content from page", then the 404 content is also not accessible and an error entry is created in the log.

#3 Updated by Oliver Bartsch 8 days ago

The Hook was replaced by an PSR-14 Event. See: #86614

So there is no possibility to generally unset the generation. What you could do now is register an own listener which is executed after and unset the HrefLang tags.

However the documentation should be updated for this case.

Also available in: Atom PDF