Issue Bug Closed

#91013Site Error Handling does not respect disabled SiteLanguages

Andreas Sturmberger 04/13/20, 13:44 updated 04/21/20, 10:42

Description

I think this is a duplicate of https://forge.typo3.org/issues/87865 but since this issue has been fixed (but it doesnt work for me) I decided to open a new one.

My Config:

languages:
  de:
    title: German
    enabled: true
    languageId: 0
    base: /
    typo3Language: de
    locale: de_DE
    iso-639-1: de
    navigationTitle: 'DE'
    hreflang: 'de'
    direction: ''
    flag: de
  it:
    title: Italian
    enabled: false
    languageId: 2
    base: /it/
    typo3Language: it
    locale: it_IT
    iso-639-1: it
    navigationTitle: 'IT'
    hreflang: 'it'
    direction: ''
    flag: it

errorHandling:
  404:
    errorCode: '404'
    errorHandler: Page
    errorContentSource: 't3://page?uid=68'

If i go to “https://mysite.com/aiosdfjoijd” the correct 404 Page is shown. However, if i go to “https://mysite.com/it/aiosdfjoijd” the following error shows up:

(1/1) #1544172838 RuntimeException
Error handler could not fetch error page "https:///mysite.com/it/404", reason: Client error: `GET https:///mysite.com/it/404` resulted in a `404 Not Found` response

If i remove the language “it” from the config file it works fine again. but since the sitelanguage is disabled, it should not be treated the way it is now.

TYPO3 9.5.15
PHP 7.2.24

Reviews 2