Project

General

Profile

Actions

Bug #86577

closed

hreflang and canonical ignores extension parameters

Added by Marc Hirdes about 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
SEO
Start date:
2018-10-05
Due date:
% Done:

100%

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

Description

To link to a detail page via hreflang and canonical without any extension parameter must be avoided. Currently it is only possible to hook into the canonical generation. I found no way to change the hreflang. It would be great if the language menue processor adds all parameters, which are used to calculate the cHash, e.g. add $GLOBALS['TSFE']->cHash_array.


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Task #86545: Make canonical and hreflang optionalClosedRichard Haeser2018-10-02

Actions
Related to TYPO3 Core - Feature #86847: addQueryString for languageMenuProcessorClosed2018-11-04

Actions
Related to TYPO3 Core - Feature #87128: Add acceptance test concerning canonicalized URL creationClosed2018-12-11

Actions
Has duplicate TYPO3 Core - Bug #86866: Hreflang tags for pages with extension records not correctClosed2018-11-06

Actions
Has duplicate TYPO3 Core - Bug #86865: Canonical tag for pages with extension records not correctClosed2018-11-06

Actions
Actions #1

Updated by Richard Haeser about 6 years ago

  • Status changed from New to Needs Feedback

I see the issue with the language menu processor indeed. As far as I can see, you can't add the addQueryString option. But do you have issues with canonical as well? Because that is already adding the current query string.

Actions #2

Updated by Christian Knauf about 6 years ago

Richard Haeser wrote:

I see the issue with the language menu processor indeed. As far as I can see, you can't add the addQueryString option. But do you have issues with canonical as well? Because that is already adding the current query string.

Have an extension provided with a routeEnhancers, but the Canonical tag on the detail pages does not change and displays the Canonical tag of the page, where the extension is included.

.....
routeEnhancers:
Suffix:
type: PageType
default: ''
map:
sitemap.xml: 1533906435
Location Plugin:
type: Extbase
limitToPages:
- 5
extension: Amlocations
plugin: Locations
routes:
-
routePath: '/ location / {location_title}'
_controller: 'Location :: show'
_arguments:
location_title: location
defaultController: 'Location :: show'
aspects:
location_title:
type: PersistedAliasMapper
tableName: tx_amlocations_domain_model_location
routeFieldName: path_segment

.....

Actions #3

Updated by Richard Haeser about 6 years ago

  • Related to Task #86545: Make canonical and hreflang optional added
Actions #4

Updated by Richard Haeser about 6 years ago

  • Status changed from Needs Feedback to Accepted
  • Assignee set to Richard Haeser
  • Target version set to Candidate for patchlevel
Actions #5

Updated by Marc Hirdes about 6 years ago

Until this not works and also otherwise, it would be great to provide a hook for the hreflang.

Actions #6

Updated by Richard Haeser about 6 years ago

  • Status changed from Accepted to In Progress
Actions #7

Updated by Richard Haeser about 6 years ago

The canonical is only not created correctly when route enhancers are set

Actions #8

Updated by Gerrit Code Review about 6 years ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #9

Updated by Benjamin Robinson about 6 years ago

I would like to test the patch. Is there already an extension available for 9 LTS that supports route enhancers and has a list and detail view?

Actions #10

Updated by Marc Hirdes about 6 years ago

To use addQueryString is maybe not a good idea. It would be better to add all params, that are used to generate the cHash. They are stored in the $GLOBALS['TSFE']->cHash_array. Maybe you like to take a look here https://github.com/clickstorm/cs_seo/issues/171

Actions #11

Updated by Benjamin Robinson about 6 years ago

I do not exactly know yet how to properly test the patch, therefore one question:
Does the LanguageMenuProcessor used in the patch check if there is a translation for the record?

Imagine the following:

1. List view:
Default language: www.domain.com/news
Translation: www.domain.de/news
This is easy, since there are no Get-Parameters. It just needs to be checked if the translation for this page exists.

2. List view, page 2
Default language: www.domain.com/news/page/2
It must be checked if this "list view page 2" is available in the translation.
If it is not available, the hreflang for this language needs to be skipped

3. Detail view
Default language: www.domain.com/news/id/25
It must be checked if there is a translation for item 25.
If it is not available, the hreflang for this language needs to be skipped

Actions #12

Updated by Gerrit Code Review about 6 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #13

Updated by Gerrit Code Review about 6 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #14

Updated by Richard Haeser about 6 years ago

  • Has duplicate Bug #86866: Hreflang tags for pages with extension records not correct added
Actions #15

Updated by Richard Haeser about 6 years ago

  • Has duplicate Bug #86865: Canonical tag for pages with extension records not correct added
Actions #16

Updated by Richard Haeser about 6 years ago

  • Related to Feature #86847: addQueryString for languageMenuProcessor added
Actions #17

Updated by Gerrit Code Review almost 6 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #18

Updated by Gerrit Code Review almost 6 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #19

Updated by Gerrit Code Review almost 6 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #20

Updated by Gerrit Code Review almost 6 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #21

Updated by Gerrit Code Review almost 6 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #22

Updated by Gerrit Code Review almost 6 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #23

Updated by Gerrit Code Review almost 6 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #24

Updated by Gerrit Code Review almost 6 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #25

Updated by Gerrit Code Review almost 6 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #26

Updated by Gerrit Code Review almost 6 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #27

Updated by Gerrit Code Review almost 6 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #28

Updated by Gerrit Code Review almost 6 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #29

Updated by Gerrit Code Review almost 6 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #30

Updated by Gerrit Code Review almost 6 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #31

Updated by Gerrit Code Review almost 6 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #32

Updated by Gerrit Code Review almost 6 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #33

Updated by Gerrit Code Review almost 6 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #34

Updated by Gerrit Code Review almost 6 years ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58611

Actions #35

Updated by Richard Haeser almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #36

Updated by Steffen Dietrich almost 6 years ago

  • Related to Feature #87128: Add acceptance test concerning canonicalized URL creation added
Actions #37

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF