Project

General

Profile

Actions

Feature #96615

closed

Use symfony default placeholder {_locale} to resolve page path

Added by Stefan Froemken over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
Link Handling, Site Handling & Routing
Target version:
Start date:
2022-01-21
Due date:
% Done:

0%

Estimated time:
PHP Version:
7.4
Tags:
Complexity:
hard
Sprint Focus:
On Location Sprint

Description

Hello core Team,

currently it is not possible to build URIs like that for translated pages:

https://example.com/de-de.html

That's because baseUri of language in config.yaml should look like /de-de/. This baseUri is NOT part of Symfony page resolver. This baseUri will always be prefixed to route returned by RouteMatcher. TYPO3 currently only supports resolving of the {tail}-part of the URI. IMO that's a big problem.

Symfony can resolve languages with its integrated placeholder {_locale}. Symfony can detect suffixes like languages as so called "staticSuffix". TYPO3 should use this API.

I will try to create a patch for that, but I need help to detect all the different use-cases.

Stefan

Actions #1

Updated by Stefan Froemken over 2 years ago

In TYPO3 12 it is still not possible to build URLS like: de-de.html

I have tried this RouteEnhancer config:

routeEnhancers:
  PageTypeSuffix:
    type: PageType
    default: '.html'
    index: ''
    map:
      '.html': 0

This config results in de-de/.html

Actions #2

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New 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/+/73123

Actions #3

Updated by Gerrit Code Review over 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/+/73123

Actions #4

Updated by Gerrit Code Review over 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/+/73123

Actions #5

Updated by Gerrit Code Review over 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/+/73123

Actions #6

Updated by Benni Mack over 1 year ago

  • Target version changed from 12.0 to 12.1
Actions #7

Updated by Oliver Hader over 1 year ago

  • Tracker changed from Bug to Feature
  • TYPO3 Version deleted (11)
  • Sprint Focus set to On Location Sprint
Actions #8

Updated by Benni Mack over 1 year ago

  • Target version changed from 12.1 to 12.2
Actions #9

Updated by Stefan Froemken about 1 year ago

  • Status changed from Under Review to Closed
Actions

Also available in: Atom PDF