Bug #90151
openContentObjectRenderer typoLink language link is generated witch /
0%
Description
If you use the method typoLink of the class ContentObjectRenderer to generate an link of an root language page like /en or /de. It comse alle the time wich / at the end e.g. /en/ /de/.
If you configure in your site config e.g.
-
title: Englisch
enabled: true
base: /en
typo3Language: default
locale: en_GB.UTF-8
iso-639-1: en
websiteTitle: ''
navigationTitle: English
hreflang: en-GB
direction: ltr
fallbackType: strict
fallbacks: ''
flag: en-us-gb
languageId: '3'
you can call the site by /de and /de/ will be redirected to /de but the typoLink method still genarte an link /de/
Updated by Timo Poppinga almost 5 years ago
Issue must be in PageLinkBuilder->build
Add an dirty hack in the file of
\TYPO3\CMS\Core\Routing\PageRouter
at line 327 like:
$path = $uri->getPath();
if(strlen($path) === 4) {
$uri = $uri->withPath(substr($path, 0, 3));
}
helps. But it is really dirty!
Updated by Timo Poppinga almost 5 years ago
- Related to Bug #90045: Sitemap Errors if the language has no trailing slash at the end like /de it is linked in the sitemap like /de/ added
Updated by Timo Poppinga almost 5 years ago
- Related to Bug #88544: Trailing slash gets added to "homepage" urls if base is without trailing slash added
Updated by Timo Poppinga almost 5 years ago
- Related to Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9 added
Updated by Benni Mack almost 5 years ago
It's currently a limitation of Site Handling:
The site root page has the slug "/" (because it needs to contain a slug), that's why all links to this page have a trailing slash.
Updated by Timo Poppinga almost 5 years ago
hi Benni, thx for replaying.
Is there an speciel reasen wey it is not suppport yet? For my point of view site config, rendering, access view /de as well redirecting from /de/ works fine. Only the link generation do not work propper.
Or do i overlooked somethink?
Is it more an Symphony or TYPO3 Routing toppic?
Updated by Susanne Moog over 4 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Richard Haeser almost 4 years ago
- Related to deleted (Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9)
Updated by Richard Haeser almost 4 years ago
- Has duplicate Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9 added
Updated by sven waechli over 1 year ago
- TYPO3 Version changed from 10 to 11
We still encounter the problem, which is quite a nasty one for multilanguage sites, on TYPO3 11 LTS. (haven't checked V12 yet)
Updated by Astrid Haubold about 1 year ago
- Related to Story #101565: Frontend related translation issues added