Project

General

Profile

Actions

Bug #96010

closed

Translated pages can be loaded with slug of default language

Added by Sybille Peters over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Link Handling, Site Handling & 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 slashResolvedStefan Bürk2023-06-10

Actions
Actions #1

Updated by Stefan Bürk over 2 years ago

  • Status changed from New to Accepted
  • Assignee set to Stefan Bürk

Confirmed. Will investigate this.

Actions #2

Updated by Felix Nagel about 2 years ago

  • Related to Bug #88715: Wrong routes for default url slugs on translated base path pages added
Actions #3

Updated by Sybille Peters about 2 years ago

  • Description updated (diff)
Actions #4

Updated by Felix Nagel about 2 years ago

Can confirm with TYPO3 11.5.8 and it looks like this a problem with pages and all other records too (which makes sense as everything is a record nowadays).

See https://github.com/georgringer/news/issues/1158 and https://github.com/fnagel/t3extblog/issues/238

Actions #5

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from Accepted to Under Review

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

Actions #6

Updated by Gerrit Code Review almost 2 years ago

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

Actions #7

Updated by Gerrit Code Review almost 2 years ago

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

Actions #8

Updated by Gerrit Code Review almost 2 years ago

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

Actions #9

Updated by Gerrit Code Review almost 2 years ago

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

Actions #10

Updated by Gerrit Code Review almost 2 years ago

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

Actions #11

Updated by Gerrit Code Review almost 2 years ago

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

Actions #12

Updated by Gerrit Code Review almost 2 years ago

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

Actions #13

Updated by Gerrit Code Review almost 2 years ago

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

Actions #14

Updated by Sybille Peters almost 2 years ago

  • Status changed from Under Review to Closed

Is duplicate.

I looked at the other issue https://forge.typo3.org/issues/88715 and it seems identical to me.

I will close this issue (as it was created at a later time) and change "Releases" in patch.

Actions #15

Updated by Sybille Peters almost 2 years ago

  • Status changed from Closed to Under Review

I am opening again, because the bugs are slightly different, and I could reproduce one and not the other.

These are the testcases I tested with and the test scenario:

To test this again, I used my already existing installation which is now the latest branch "main" with TYPO3 core v12 and a minimal "coredev" instance (create installation from git cloned repo) with "styleguide" extension for Frontend. Created pages for frontend testing with styleguide. Without introduction package or bootstrap_package.

I also tried changing the setting fallbackType from "strict" to "fallback" in the translation language German and added English (default language) as fallback language, but this did not make a difference in either case, so changed it back again to "strict".

Test scenario

  • English is default language
  • German is translation

URL with German language has prefix /de

I created these pages:

en: /test/languages
de: /de/test/uebersetzungen

(to properly test the slugs should differ!)

I tested this:

Test 1 : German Slug as English URL: /test/uebersetzungen
  • URL without prefix
  • corresponds with issue Ronny https://forge.typo3.org/issues/88715
  • Load URL: /test/uebersetzungen
  • expected result: 404
  • actual result: 404
  • problem NOT reproducable
Test 2 : English Slug as German URL: /de/test/languages
  • URL with prefix
  • correspondes with this issue https://forge.typo3.org/issues/96010
  • load URL: /de/test/languages
  • expected result: 404
  • actual result: page is loaded (contains content of default language)
  • problem reproducable

"Reproducable" means page can be loaded and shows content. We do expect page cannot be loaded (404) because the slug is loaded with a different language prefix.

Actions #16

Updated by Gerrit Code Review almost 2 years ago

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

Actions #17

Updated by Gerrit Code Review over 1 year ago

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

Actions #18

Updated by Gerrit Code Review over 1 year ago

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

Actions #19

Updated by Oliver Hader over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #20

Updated by Gerrit Code Review over 1 year ago

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

Actions #21

Updated by Gerrit Code Review over 1 year ago

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

Actions #22

Updated by Gerrit Code Review over 1 year ago

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

Actions #23

Updated by Gerrit Code Review over 1 year ago

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

Actions #24

Updated by Gerrit Code Review over 1 year ago

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

Actions #25

Updated by Gerrit Code Review over 1 year ago

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

Actions #26

Updated by Gerrit Code Review over 1 year ago

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

Actions #27

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.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/+/76494

Actions #28

Updated by Stefan Bürk over 1 year ago

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

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions #30

Updated by Jens Zscheile over 1 year ago

  • Related to 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. added
Actions #31

Updated by Stefan Bürk 11 months ago

  • Related to Bug #100990: Pages with trailing slash in slug are not resolved if requested uri does not contain a trailing slash added
Actions

Also available in: Atom PDF