Bug #91353

Epic #89797: HrefLang / Canonical issues

Deactivation of Hreflang Tags not possible anymore

Added by Ben Robinson over 1 year ago. Updated 11 months ago.

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

100%

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

Description

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

unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['hreflang']);

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

I have tried whether disabling the canonical via the similar …

unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\CMS\Frontend\Page\PageGenerator']['generateMetaTags']['canonical']);
… 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.


Related issues

Related to TYPO3 Core - Feature #93188: Possibility to disable hreflang per pageClosedRichard Haeser2020-12-30

Actions

Also available in: Atom PDF