Project

General

Profile

Actions

Bug #87865

closed

Site error handling does not work with disabled languages

Added by Jonas Schwabe about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-03-08
Due date:
% Done:

100%

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

Description

On a page with multiple site languages where at least one is disabled (e.g. example.com/en), error handlers that are configured to render a page fail because the page is not accessible with the current language.

Oops, an error occurred!
Error handler could not fetch error page "https://example.com/de/page-not-found", reason: Client error: `GET https://example.com/de/page-not-found` resulted in a `404 Page is not available in the requested language.` response
More information regarding this error might be available online.

As /de is disabled I would expect that accessing /de would show me the 404 page of the main language (e.g. /en/page-not-found).


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91013: Site Error Handling does not respect disabled SiteLanguagesClosed2020-04-13

Actions
Actions #1

Updated by Jonas Schwabe about 5 years ago

Example site configuration:

rootPageId: 1
base: 'http://typo3.ddev.local/'
baseVariants: {  }
languages:
  -
    title: Englisch
    enabled: true
    languageId: '0'
    base: /en
    typo3Language: default
    locale: en_UD.UTF-8
    iso-639-1: en
    navigationTitle: English
    hreflang: en-US
    direction: ''
    flag: en-us-gb
  -
    title: Deutsch
    enabled: false
    languageId: '1'
    base: /de/
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ''
    fallbackType: strict
    flag: de
errorHandling:
  -
    errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=2'
routes: {  }

My approach would be to do a check in generateUri and only use a specific language if it is accessible and fall back to getDefaultLanguage if that is not the case.
I prepared a patch but I'm not able to log into https://review.typo3.org

Actions #2

Updated by Gerrit Code Review about 5 years ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Gerrit Code Review about 5 years ago

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

Actions #4

Updated by Gerrit Code Review about 5 years ago

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

Actions #5

Updated by Riccardo De Contardi about 5 years ago

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

Updated by Gerrit Code Review about 5 years ago

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

Actions #7

Updated by Gerrit Code Review about 5 years ago

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

Actions #8

Updated by Gerrit Code Review about 5 years ago

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

Actions #9

Updated by Gerrit Code Review about 5 years ago

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

Actions #10

Updated by Gerrit Code Review about 5 years ago

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

Actions #11

Updated by Gerrit Code Review about 5 years ago

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

Actions #12

Updated by Anonymous about 5 years ago

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

Updated by Benni Mack about 5 years ago

  • Status changed from Resolved to Closed
Actions #14

Updated by Andreas Sturmberger about 4 years ago

  • Related to Bug #91013: Site Error Handling does not respect disabled SiteLanguages added
Actions

Also available in: Atom PDF