Project

General

Profile

Actions

Bug #103451

open

LanguageMenuProcessor handles language availbility wrong

Added by Pascal Geldmacher 3 months ago. Updated 25 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2024-03-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I think something with the LanguageMenuProcessor not work correctly.

Following situation. I created a page in the default language and in german language. I also have the languages austria and swiss. Both languages have a fallback chain to german but both have no page. The frontend creates the language menu for swiss and austria which leads to a 404 page because there is no page in this language. If I change the fallback chain from german to the default language. swiss and austria is hidden.

Here's the language.yaml settings:

languages:
    -
        title: English Int
        enabled: true
        languageId: '0'
        base: /en/
        typo3Language: default
        locale: 'en_GB.UTF-8,en_GB'
        iso-639-1: en
        navigationTitle: English International
        hreflang: en
        direction: ltr
        flag: en-us-gb
    -
        title: German
        enabled: true
        languageId: '3'
        base: /de/
        typo3Language: de
        locale: 'de_DE.UTF-8,de_DE'
        iso-639-1: de
        navigationTitle: Deutsch
        hreflang: de
        direction: ltr
        flag: de
        solr_core_read: '%env(SOLR_CORE_PREFIX_READ)%_de'
        fallbackType: fallback
        fallbacks: '0'
    -
        title: German Austria
        enabled: true
        languageId: '4'
        base: /de-at/
        typo3Language: de
        locale: 'de_AT.UTF-8,de_AT'
        iso-639-1: de
        navigationTitle: Deutsch (AT)
        hreflang: de-AT
        direction: ltr
        fallbackType: fallback
        fallbacks: '3'
        flag: at
    -
        title: German Swiss
        enabled: true
        languageId: '5'
        base: /de-ch/
        typo3Language: de
        locale: 'de_CH.UTF-8,de_CH'
        iso-639-1: de
        navigationTitle: Deutsch (CH)
        hreflang: de-CH
        direction: ltr
        fallbackType: fallback
        fallbacks: '3'
        flag: ch

the typoscript settings:

page = PAGE
page {
    20.dataProcessing {
        40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
        40 {
            languages = 0,3,4,5
            as = languagenavigation
        }
    }
}

Files

page.png (80.9 KB) page.png Pascal Geldmacher, 2024-03-21 12:52
Actions

Also available in: Atom PDF