Bug #87865
closedSite error handling does not work with disabled languages
100%
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).
Updated by Jonas Schwabe over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Riccardo De Contardi over 5 years ago
- Category set to Site Handling, Site Sets & Routing
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Anonymous over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 14c0a18cccf03092924ac01584b4a112a097b04b.
Updated by Andreas Sturmberger over 4 years ago
- Related to Bug #91013: Site Error Handling does not respect disabled SiteLanguages added