Issue Bug Closed

#88490Wrong site behaviour with empty fallback chain

Alexander Vogt 06/05/19, 09:15 updated 12/23/19, 22:49

Description

When I save the attached language in the backend, I get the following YAML configuration:

  -
    title: US
    enabled: true
    languageId: '5'
    base: /en-us/
    typo3Language: default
    locale: en_US.UTF-8
    iso-639-1: en
    navigationTitle: ''
    hreflang: ''
    direction: ''
    fallbackType: strict
    fallbacks: ''
    flag: us

The empty value is converted to “0” on a call in the frontend and thus a fallback is applied to the default language.

The conversion is done in the site language (TYPO3\CMS\Core\Site\Entity\SiteLanguge):

$fallbackLanguageIds = $configuration['fallbacks'];

if (is_string($fallbackLanguageIds)) {
   $fallbackLanguageIds = explode(',', $fallbackLanguageIds);
}

$this->fallbackLanguageIds = array_map('intval', $fallbackLanguageIds);

Reviews 2