Bug #88032

Only populate HrefLang, if they are available

Added by Julian Wundrak 8 months ago. Updated 7 months ago.

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

100%

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

Description

Currently href_lang-Tags are generated and populate every time. E.g. there is a news entry, that is only for Language 0,1,2 but not in Language 3 available, you have the possibility to throw a `InvalidRouteArgumentsException` - Exception. In this case, href lang generates also an entry for this page, but the link is only the site-base-route.

Simply check, if the given link is not empty, resolves the problem. Pull request is after submit available


Related issues

Related to TYPO3 Core - Bug #87814: Redirect loop when called with e.g. example.com/index.php?id=1&L=1 Resolved 2019-02-28

Associated revisions

Revision 5afb3940 (diff)
Added by Julian Wundrak 7 months ago

[BUGFIX] Populate href lang URI only if the link is available

If there are e.g., records that have no translation, the
HrefLangGenerator outputs the site-base URL. Expected is that the entry
for this page is suppressed.

Change-Id: I6fbd4dd00955906dff13c0e5aceea6804c52dd1b
Resolves: #88032
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60350
Tested-by: TYPO3com <>
Tested-by: Jörg Bösche <>
Tested-by: Richard Haeser <>
Reviewed-by: Jörg Bösche <>
Reviewed-by: Richard Haeser <>

Revision f28bb698 (diff)
Added by Julian Wundrak 7 months ago

[BUGFIX] Populate href lang URI only if the link is available

If there are e.g., records that have no translation, the
HrefLangGenerator outputs the site-base URL. Expected is that the entry
for this page is suppressed.

Resolves: #88032
Releases: master, 9.5
Change-Id: I6fbd4dd00955906dff13c0e5aceea6804c52dd1b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60458
Tested-by: TYPO3com <>
Tested-by: Richard Haeser <>
Reviewed-by: Richard Haeser <>

Revision 2d458ebe (diff)
Added by Marco Kaiser 7 months ago

[BUGFIX] URL without base runs into a redirect loop

Calling something like bla.example.com/?id=34&type=2
runs in a endless loop.

The change removes the restrictive redirect.

Change-Id: I0457c48640d6b47a0947ed5115a96cf73cc97d81
Resolves: #88032
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59891
Tested-by: Benni Mack <>
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Reviewed-by: Benni Mack <>
Reviewed-by: Georg Ringer <>

Revision bdeb4746 (diff)
Added by Marco Kaiser 7 months ago

[BUGFIX] URL without base runs into a redirect loop

Calling something like bla.example.com/?id=34&type=2
runs in a endless loop.

The change removes the restrictive redirect.

Change-Id: I0457c48640d6b47a0947ed5115a96cf73cc97d81
Resolves: #88032
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60514
Tested-by: Alexander Opitz <>
Tested-by: TYPO3com <>
Tested-by: Georg Ringer <>
Reviewed-by: Alexander Opitz <>
Reviewed-by: Georg Ringer <>

History

#1 Updated by Julian Wundrak 8 months ago

  • Category set to SEO

#2 Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

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/c/Packages/TYPO3.CMS/+/60350

#3 Updated by Gerrit Code Review 8 months 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/c/Packages/TYPO3.CMS/+/59891

#4 Updated by Gerrit Code Review 8 months 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/c/Packages/TYPO3.CMS/+/60350

#5 Updated by Gerrit Code Review 7 months 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/c/Packages/TYPO3.CMS/+/60350

#6 Updated by Gerrit Code Review 7 months ago

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

#7 Updated by Julian Wundrak 7 months ago

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

#8 Updated by Gerrit Code Review 7 months ago

  • Status changed from Resolved to Under Review

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/c/Packages/TYPO3.CMS/+/59891

#9 Updated by Anonymous 7 months ago

  • Status changed from Under Review to Resolved

#10 Updated by Gerrit Code Review 7 months ago

  • Status changed from Resolved to Under Review

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

#11 Updated by Anonymous 7 months ago

  • Status changed from Under Review to Resolved

#12 Updated by Benni Mack 7 months ago

  • Status changed from Resolved to Closed

#13 Updated by Benni Mack 12 days ago

  • Related to Bug #87814: Redirect loop when called with e.g. example.com/index.php?id=1&L=1 added

Also available in: Atom PDF