Project

General

Profile

Actions

Bug #90151

open

ContentObjectRenderer typoLink language link is generated witch /

Added by Timo Poppinga over 4 years ago. Updated 9 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2020-01-19
Due date:
% Done:

0%

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

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/


Related issues 4 (3 open1 closed)

Related to TYPO3 Core - Bug #90045: Sitemap Errors if the language has no trailing slash at the end like /de it is linked in the sitemap like /de/Needs Feedback2020-01-02

Actions
Related to TYPO3 Core - Bug #88544: Trailing slash gets added to "homepage" urls if base is without trailing slashAccepted2019-06-12

Actions
Related to TYPO3 Core - Story #101565: Frontend related translation issuesNew2023-08-03

Actions
Has duplicate TYPO3 Core - Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9Closed2020-01-01

Actions
Actions #1

Updated by Timo Poppinga over 4 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!

Actions #2

Updated by Timo Poppinga over 4 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
Actions #3

Updated by Timo Poppinga over 4 years ago

  • Related to Bug #88544: Trailing slash gets added to "homepage" urls if base is without trailing slash added
Actions #4

Updated by Timo Poppinga over 4 years ago

  • Related to Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9 added
Actions #5

Updated by Benni Mack over 4 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.

Actions #6

Updated by Timo Poppinga over 4 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?

Actions #7

Updated by Susanne Moog about 4 years ago

  • Category set to Link Handling, Site Handling & Routing
Actions #8

Updated by Richard Haeser about 3 years ago

  • Related to deleted (Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9)
Actions #9

Updated by Richard Haeser about 3 years ago

  • Has duplicate Bug #90043: On language root level the canonical link is not generated correctly; also in TYPO3 9 added
Actions #10

Updated by sven waechli 9 months 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)

Actions #11

Updated by Astrid Haubold 6 months ago

  • Related to Story #101565: Frontend related translation issues added
Actions

Also available in: Atom PDF