Project

General

Profile

Actions

Bug #89648

closed

Epic #89797: HrefLang / Canonical issues

On Plugin detail pages, incorrect hreflang tags are created when the record has no translation in the target language

Added by Christian Eßl about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
SEO
Start date:
2019-11-12
Due date:
% Done:

0%

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

Description

Let't take ext:news as an example:

- Create a page with the languages "Default" and "German"
- Install ext:seo
- Install ext:news
- Set up a news list page and a news detail page
- Translate the news detail page to "German"
- Create a news record in the default language. (but don't translate it)

Now if you go to the frontend and access the news detail in the default language, the HrefLangGenerator will create a hreflang for the german language.
This hreflang url will contain all the get parameters to the news record, although no german translation for this record exists. -> which will trigger a 404 error.

To fix this behaviour, the HrefLangGenerator would need to know about the plugin in use. (which is not simple to to do in a generic way). Better option could be an easy solution to extend the HrefLangGenerator with a hook to manipulate the output.

As another example, we are currently using a custom written HrefLangGenerator here, that reads the site configs RouteEnhancer config, checks if one of the route enhancers is in use, has a PersistedAliasMapper set and acts accordingly. (and works pretty well in a agnostic manner)
But our solution would only work, if a route enhancer is configured. Without a routeEnhancer, you can't easily determine for a get parameter, if it is mapped to a database record.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #86614: Provide a possibility to override or hook into the hreflang generatorClosed2018-10-10

Actions
Actions #1

Updated by Christian Eßl about 5 years ago

  • Related to Task #86614: Provide a possibility to override or hook into the hreflang generator added
Actions #2

Updated by Christian Eßl about 5 years ago

  • Description updated (diff)
  • Category set to SEO
Actions #3

Updated by Andreas Kießling about 5 years ago

Hi Christian,

would you mind sharing your solution? I'm having the exact same problem with a news detail page

Actions #4

Updated by Richard Haeser almost 5 years ago

  • Parent task set to #89797
Actions #5

Updated by Christian Eßl almost 5 years ago

The HreflangGenerator in TYPO3 10 now provides a hook that extensions can use to correctly handle the hreflang in their eytensions context. See issue #86614.
So this issue can be closed as well.

Actions #6

Updated by Daniel Goerz almost 5 years ago

  • Status changed from New to Closed

Closed as suggested by Christian

Actions

Also available in: Atom PDF