Project

General

Profile

Actions

Bug #90641

closed

Setting hreflang to "x-default" break html-lang attribute

Added by David Gurk over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
SEO
Target version:
-
Start date:
2020-03-04
Due date:
% Done:

0%

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

Description

I have the following Site Handling config in a multi page tree setup:

Each page tree uses an own config.yaml for the site configuration.

On the homepage within the HTML-head this correct hreflang tags where rendered:

<link rel="alternate" href="https://www.example.com/it-it/" hreflang="de-DE">
<link rel="alternate" href="https://www.example.com/it-it/" hreflang="it-IT">
<link rel="alternate" href="https://www.example.com/it-it/" hreflang="en-DB">
<link rel="alternate" href="https://www.example.com/" hreflang="x-default">

This works, since I set hreflang to "x-default" for the default international page.

Since this property is `Used within for "lang" and "hreflang" attributes` I got a the following HTML-tag:

<html dir="ltr" lang="x-default">

This is indeed wrong.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #89484: Use SiteLanguage hreflang for html-tag lang-attributeClosedSimon Gilli2019-10-23

Actions
Actions #1

Updated by Simon Gilli over 4 years ago

  • Related to Bug #89484: Use SiteLanguage hreflang for html-tag lang-attribute added
Actions #2

Updated by Simon Gilli over 4 years ago

  • Status changed from New to Accepted
  • Assignee set to Simon Gilli
Actions #3

Updated by Kevin Appelt over 4 years ago

There should be no need to set the x-default hreflang, as it is handled by the HreflangGenerator. (typo3/sysext/seo/Classes/HrefLang/HrefLangGenerator.php Line 96)
You should set the hreflang of the international page to the "correct" value, like "en-GB" and not to x-default.

Could you please check whether this has already solved the problem.

Actions #4

Updated by David Gurk over 4 years ago

@Kevin no-lastname-given
This is correct for single page tree solutions. Thanks. I saw we have a custom implementation of hreflang tags for the multi page tree setup. So I can fix this there.

@Simon
I would suggest to close this issue.

Actions #5

Updated by Simon Gilli over 4 years ago

  • Status changed from Accepted to Closed
Actions

Also available in: Atom PDF