Project

General

Profile

Actions

Bug #96010

closed

Translated pages can be loaded with slug of default language

Added by Sybille Peters about 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2021-11-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
translation, routing, slugs
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

Reproduce

1. Install TYPO3 with latest core and introduction package (e.g. with DDEV https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/Appendix/SettingUpTypo3Ddev.html) and then install introduction package

Site configuration should also be created automatically, is:

typo3conf/sites/introduction/config.yaml

base: /
languages:
  -
    title: English
    enabled: true
    languageId: 0
    base: /
    typo3Language: default
    locale: en_US.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-US
    direction: ''
    flag: us
  -
    title: Dansk
    enabled: true
    languageId: 1
    base: /da/
    typo3Language: da
    locale: da_DK.UTF-8
    iso-639-1: da
    navigationTitle: Dansk
    hreflang: da-DK
    direction: ''
    fallbackType: fallback
    fallbacks: ''
    flag: dk
  -
    title: German
    enabled: true
    languageId: 2
    base: /de/
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ''
    fallbackType: fallback
    fallbacks: '1,0'
    flag: de
rootPageId: 1
websiteTitle: 'TYPO3 Introduction Package'

2. Create translation (German) for page /features, set slug to /features-de.

Revert redirects to reduce site-effects.

3. Enable the translated page

4. Load the 2 URLs:

  • /de/features-de (this is correct)
  • /de/features (this is not - it uses the slug of the default language)

Actual result

both URLs load the same page

Also compare the source code - it will show the same canonical URL and same page ID:

<link rel="canonical" href="/de/features-de"/>
<body id="p81" class="page-81 pagelevel-1 language-2 backendlayout-default layout-default">

Expected result

/de/features should show an error page

Versions

  • was reproduced with latest master
  • also 10.4.21

Impact

This results in duplicate content: same page with several URLs. This can also result in redirect chains which do not get detected with redirect:checkintegrity (I had several of these, investigating I found this issue).


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #88715: Wrong routes for default url slugs on translated base path pagesClosedStefan Bürk2019-07-10

Actions
Related to TYPO3 Core - Bug #99554: After I've installed patch lvl 11.5.18, mount points with non translated slugs stoped working and shows 404 in the FE.New2023-01-16

Actions
Related to TYPO3 Core - Bug #100990: Pages with trailing slash in slug are not resolved if requested uri does not contain a trailing slashClosedStefan Bürk2023-06-10

Actions
Actions

Also available in: Atom PDF