Project

General

Profile

Actions

Bug #103582

open

SiteConfiguration: Empty fallback not working anymore

Added by Mark Weisgerber 8 months ago. Updated 5 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
Category:
Site Handling, Site Sets & Routing
Start date:
2024-04-09
Due date:
% Done:

0%

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

Description

Hi,
Since the latest update to V12.4.14, the "fallbacks" field from the SiteConfiguration for languages no longer seems to work.
Previously I had the following configuration in my languages:

languages:
  - languageId: 0
    enabled: true
    title: Deutsch
    base: 'https://www.darf-ich-mit.de/'
    locale: de_DE.utf8
    navigationTitle: Deutsch
    hreflang: de-DE
    direction: ''
    flag: de
    websiteTitle: ''
    deeplTargetLanguage: DE
  - languageId: 1
    enabled: true
    title: Polnisch
    base: 'https://www.fellow.dog/pl/'
    locale: pl_PL.utf8
    navigationTitle: Polski
    hreflang: pl-PL
    direction: ''
    fallbackType: strict
    fallbacks: ''
    flag: pl
    websiteTitle: ''
    deeplTargetLanguage: PL
  - languageId: 2
    enabled: true
    title: Englisch
    websiteTitle: fellow.dog
    base: 'https://www.fellow.dog/'
    locale: en_US.utf8
    navigationTitle: English
    hreflang: en-US
    direction: ''
    fallbackType: strict
    fallbacks: ''
    flag: en-us-gb
    deeplTargetLanguage: EN-US

The MainLanguage works, but all other languages only render an empty content area.
The remedy is to define "fallbacks: '0'" everywhere, but this is a behavior I don't want because I only want to display data records for which a translation exists

I reverted the update back to 12.4.13 and it works again.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #101883: TypoScript Issue between v11 and v12Closed2023-09-08

Actions
Related to TYPO3 Core - Bug #104335: Broken state in case of Exception during link building in MenusClosedDaniel Siepmann2024-07-09

Actions
Actions #1

Updated by Mark Weisgerber 8 months ago

Please remove the asterisks at fallbacks: '', this is actually markup because I wanted to make the text bold. Unfortunately I can't edit the text.

Actions #2

Updated by Markus Klein 8 months ago

  • Description updated (diff)
Actions #3

Updated by Stefan Bürk 7 months ago

Mark Weisgerber wrote in #note-1:

Please remove the asterisks at fallbacks: '', this is actually markup because I wanted to make the text bold. Unfortunately I can't edit the text.

What do you mean ? which asterisks ?

Actions #4

Updated by Stefan Bürk 7 months ago

  • Status changed from New to Needs Feedback
  • Assignee set to Stefan Bürk

Can you provide some more context ? More about a constelation or how to create something, beside the SiteConfiguration and what you get versus what you expect (or got before).

I tested it with TYPO3 v12 (monorepo) and v13 (monorepo) with following scenario:

  • two languages, default (EN)[0] and german (DE)[1] in SiteConfiguration, (DE)[1] configured with fallbackType: strict and fallbacks: ''
  • created a new page (default langauge) and added two content elements
  • create a translated page (not translating/copy any elements)
  • preview page (DE)[1] -> no content elements rendered > expected
  • translate page content from default language, only selecting one element to translate
  • preview page (DE)[1] -> only the translated content element is shown > expected
languages:
  -
    title: English
    enabled: true
    languageId: 0
    base: /
    locale: en_US.UTF-8
    navigationTitle: English
    flag: us
    typo3Language: default
    iso-639-1: en
    hreflang: en-us
    direction: ltr
    websiteTitle: ''
  -
    title: 'styleguide demo language german'
    enabled: true
    base: /de/
    typo3Language: de
    locale: de_DE.UTF-8
    iso-639-1: de
    websiteTitle: ''
    navigationTitle: ''
    hreflang: de-de
    direction: ltr
    fallbackType: strict
    fallbacks: ''
    flag: de
    languageId: 1

Not tested it with 12.4.14 or 12.4.13, only with 12.4.15-dev

I'd say that is the expected behaviour - at least from my understanding. If you get default
content elements on a translated page without any element with 12.4.13 and fallbackType: strict
and fallbacks: '' that's most likely a BUG which has been fixed (intendet or not intendet).

Did not searched deeply for a fix, but scrolling through the release notes for 12.4.14 I cannot
identify which change may have changed that behaviour [1] or being a canditate for it.

[1] https://get.typo3.org/release-notes/12.4.14

Actions #5

Updated by Mark Weisgerber 7 months ago

Sure, I'll try to go into more detail.

The project runs in composer mode and uses the latest version of EXT:bootstrap_package. I've thought about whether this could have something to do with the extension, but there's nothing in the Github issue panel so far.

I have about 20 languages and all of them should behave strictly and only display content if it has been translated. I never want to display a fallback to another language.
For all languages I use this fallback config (except for languageID 0)

    fallbackType: strict
    fallbacks: ''

Let's start from the home page: I have a content element in my default language and have translated (not copied) it into any other language.
In the frontend, the page is displayed correctly, but when I switch to another language, it does not show me any content element, but only the translated layout.

However, with TYPO3 12.4.13 it works correctly
In my staging system with TYPO3 12.4.14 the above mentioned behavior occurs. (If required, I can also provide backend access)

The content elements are rendered in the Bootstrap_Package as follows:
https://github.com/benjaminkott/bootstrap_package/blob/master/Configuration/TypoScript/ContentElement/Helper/DynamicContent.typoscript

Use in Fluid:

<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.uid}', colPos: '0', slide: '{theme.pagelayout.{pagelayout}.colPos.0.slide}'}" />

Here is the full language-block from the sites.yaml:

languages:
  - languageId: 0
    enabled: true
    title: Deutsch
    base: 'https://test.darf-ich-mit.de/'
    locale: de_DE.utf8
    navigationTitle: Deutsch
    flag: de
    websiteTitle: ''
    deeplTargetLanguage: DE
  - languageId: 1
    enabled: true
    title: Polnisch
    base: 'https://test.darf-ich-mit.de/pl/'
    locale: pl_PL.utf8
    navigationTitle: Polski
    fallbackType: strict
    fallbacks: ''
    flag: pl
    websiteTitle: ''
    deeplTargetLanguage: PL
  - languageId: 2
    enabled: true
    title: Englisch
    websiteTitle: fellow.dog
    base: 'https://test.darf-ich-mit.de/en/'
    locale: en_US.utf8
    navigationTitle: English
    fallbackType: strict
    fallbacks: ''
    flag: en-us-gb
    deeplTargetLanguage: EN-US
  - languageId: 3
    title: Niederländisch
    locale: nl_NL.utf8
    base: 'https://test.darf-ich-mit.de/nl/'
    websiteTitle: fellow.dog
    navigationTitle: Nederlands
    fallbackType: strict
    fallbacks: ''
    flag: nl
    enabled: true
    deeplTargetLanguage: NL
  - languageId: 4
    title: Dänisch
    locale: da_DK.utf8
    base: 'https://test.darf-ich-mit.de/da/'
    websiteTitle: fellow.dog
    navigationTitle: Dansk
    fallbackType: strict
    fallbacks: ''
    flag: dk
    enabled: true
    deeplTargetLanguage: DA
  - languageId: 5
    title: Italienisch
    locale: it_IT.utf8
    base: 'https://test.darf-ich-mit.de/it/'
    websiteTitle: fellow.dog
    navigationTitle: Italiano
    fallbackType: strict
    fallbacks: ''
    flag: it
    enabled: true
    deeplTargetLanguage: IT
  - languageId: 6
    title: Tschechisch
    locale: cs_CZ.utf8
    base: 'https://test.darf-ich-mit.de/cz/'
    websiteTitle: fellow.dog
    navigationTitle: čeština
    fallbackType: strict
    fallbacks: ''
    flag: cz
    enabled: true
    deeplTargetLanguage: CS
  - languageId: 7
    title: Spanisch
    locale: es_ES.utf8
    base: 'https://test.darf-ich-mit.de/es/'
    websiteTitle: fellow.dog
    navigationTitle: Español
    fallbackType: strict
    fallbacks: ''
    flag: es
    enabled: true
    deeplTargetLanguage: ES
  - languageId: 8
    title: Französisch
    locale: fr_FR.utf8
    base: 'https://test.darf-ich-mit.de/fr/'
    websiteTitle: fellow.dog
    navigationTitle: Français
    fallbackType: strict
    fallbacks: ''
    flag: fr
    enabled: true
    deeplTargetLanguage: FR
  - languageId: 9
    title: Schwedisch
    locale: se_SE.UTF-8
    base: 'https://test.darf-ich-mit.de/se/'
    websiteTitle: fellow.dog
    navigationTitle: svenska
    fallbackType: strict
    fallbacks: ''
    flag: se
    enabled: false
    deeplTargetLanguage: SV
  - languageId: 10
    title: Japanisch
    locale: ja_JP.UTF-8
    base: 'https://test.darf-ich-mit.de/jp/'
    websiteTitle: fellow.dog
    navigationTitle: 日本
    fallbackType: strict
    fallbacks: ''
    flag: jp
    enabled: true
    deeplTargetLanguage: JA
  - languageId: 11
    title: Rumänisch
    locale: ro_RO.UTF-8
    base: 'https://test.darf-ich-mit.de/ro/'
    websiteTitle: fellow.dog
    navigationTitle: Română
    fallbackType: strict
    fallbacks: ''
    flag: ro
    enabled: false
    deeplTargetLanguage: RO
  - title: Griechisch
    locale: gr_GR.UTF-8
    base: 'https://test.darf-ich-mit.de/gr/'
    websiteTitle: fellow.dog
    navigationTitle: Ελληνικά
    fallbackType: strict
    fallbacks: ''
    flag: gr
    enabled: false
    languageId: 12
    deeplTargetLanguage: EL
  - title: Türkisch
    locale: tr_TR.UTF-8
    base: 'https://test.darf-ich-mit.de/tr/'
    websiteTitle: fellow.dog
    navigationTitle: Türkçe
    fallbackType: strict
    fallbacks: ''
    flag: tr
    enabled: false
    languageId: 13
    deeplTargetLanguage: TR
  - title: Lettisch
    locale: lv_LV.UTF-8
    base: 'https://test.darf-ich-mit.de/lv/'
    websiteTitle: fellow.dog
    navigationTitle: Latviešu
    fallbackType: strict
    fallbacks: ''
    flag: lv
    enabled: false
    languageId: 14
    deeplTargetLanguage: LV
  - title: Ungarisch
    locale: hu_HU.UTF-8
    base: 'https://test.darf-ich-mit.de/hu/'
    websiteTitle: fellow.dog
    navigationTitle: Magyar
    fallbackType: strict
    fallbacks: ''
    flag: hu
    enabled: false
    languageId: 15
    deeplTargetLanguage: HU
  - title: Slowenisch
    locale: si_SI.UTF-8
    base: 'https://test.darf-ich-mit.de/si/'
    websiteTitle: fellow.dog
    navigationTitle: Slovenščina
    fallbackType: strict
    fallbacks: ''
    flag: si
    enabled: false
    languageId: 16
    deeplTargetLanguage: SL
  - title: Finnisch
    locale: fi_FI.UTF-8
    base: 'https://test.darf-ich-mit.de/fi/'
    websiteTitle: fellow.dog
    navigationTitle: Suomalainen
    fallbackType: strict
    fallbacks: ''
    flag: fi
    enabled: false
    languageId: 17
    deeplTargetLanguage: FI
  - title: Bulgarisch
    locale: bg_BG.UTF-8
    base: 'https://test.darf-ich-mit.de/bg/'
    websiteTitle: fellow.dog
    navigationTitle: български
    fallbackType: strict
    fallbacks: ''
    flag: bg
    enabled: false
    languageId: 18
    deeplTargetLanguage: BG
  - title: Litauisch
    locale: bg_BG.UTF-8
    base: 'https://test.darf-ich-mit.de/lt/'
    websiteTitle: fellow.dog
    navigationTitle: lietuvių
    fallbackType: strict
    fallbacks: ''
    flag: lt
    enabled: false
    languageId: 19
    deeplTargetLanguage: LT
  - title: Portugiesisch
    locale: pt_PT.UTF-8
    base: 'https://test.darf-ich-mit.de/pt/'
    websiteTitle: fellow.dog
    navigationTitle: Português
    fallbackType: strict
    fallbacks: ''
    flag: pt
    enabled: false
    languageId: 20
    deeplTargetLanguage: PT-PT
  - title: Chinesisch
    locale: cn_CN.UTF-8
    base: 'https://test.darf-ich-mit.de/cn/'
    websiteTitle: fellow.dog
    navigationTitle: 中文
    fallbackType: strict
    fallbacks: ''
    flag: cn
    enabled: false
    languageId: 21
    deeplTargetLanguage: ZH
  - title: Norwegisch
    locale: no_NO.UTF-8
    base: 'https://test.darf-ich-mit.de/no/'
    websiteTitle: fellow.dog
    navigationTitle: norsk
    fallbackType: strict
    fallbacks: ''
    flag: no
    enabled: false
    languageId: 22
    deeplTargetLanguage: NB
  - title: Indonesisch
    locale: id_ID.UTF-8
    base: 'https://test.darf-ich-mit.de/id/'
    websiteTitle: fellow.dog
    navigationTitle: Bahasa Indonesia
    fallbackType: strict
    fallbacks: ''
    flag: id
    enabled: false
    languageId: 23
    deeplTargetLanguage: ID
  - title: Koreanisch
    locale: kr_KR.UTF-8
    base: 'https://test.darf-ich-mit.de/kr/'
    websiteTitle: fellow.dog
    navigationTitle: 한국어
    fallbackType: strict
    fallbacks: ''
    flag: kr
    enabled: false
    languageId: 24
    deeplTargetLanguage: KO
  - title: Slowakisch
    locale: sk_SK.UTF-8
    base: 'https://test.darf-ich-mit.de/sk/'
    websiteTitle: fellow.dog
    navigationTitle: Slovenská
    fallbackType: strict
    fallbacks: ''
    flag: sk
    enabled: false
    languageId: 25
    deeplTargetLanguage: SK
  - title: Estnisch
    locale: ee_EE.UTF-8
    base: 'https://test.darf-ich-mit.de/ee/'
    websiteTitle: fellow.dog
    navigationTitle: Eesti
    fallbackType: strict
    fallbacks: ''
    flag: ee
    enabled: false
    languageId: 26
    deeplTargetLanguage: ET
  - direction: rtl
    title: Arabisch
    locale: ar_SA.UTF-8
    base: 'https://test.darf-ich-mit.de/ar/'
    websiteTitle: fellow.dog
    navigationTitle: العربية
    fallbackType: strict
    fallbacks: ''
    flag: sa
    enabled: false
    languageId: 27
    deeplTargetLanguage: AR
  - title: Russisch
    locale: ru_RU.utf8
    base: 'https://test.darf-ich-mit.de/ru/'
    websiteTitle: fellow.dog
    navigationTitle: Русский
    fallbackType: strict
    fallbacks: ''
    flag: ru
    enabled: false
    languageId: 28
    deeplTargetLanguage: RU
  - languageId: 29
    title: Ukrainisch
    locale: ru_UA.utf8
    base: 'https://test.darf-ich-mit.de/ua/'
    websiteTitle: fellow.dog
    navigationTitle: Українська
    fallbackType: strict
    fallbacks: ''
    flag: ua
    enabled: false
    deeplTargetLanguage: UK
  - languageId: 30
    title: Hindi
    locale: hi_IN.utf8
    base: 'https://test.darf-ich-mit.de/hi/'
    websiteTitle: fellow.dog
    navigationTitle: हिन्दी
    fallbackType: strict
    fallbacks: ''
    flag: in
    enabled: false

Have I forgotten something that might be important? Please let me know if there is anything I can do.
Maybe it has something to do with the fact that I use German as LanguageID 0?

Actions #6

Updated by Mark Weisgerber 5 months ago

Hi,

i just located the problem. When i undo this commit, it works again:
https://github.com/TYPO3/typo3/commit/6578a968349ac336dd816d405ddab26b1b299565

But I don't know why the menu has an effect on my content rendering. Does anyone have any ideas? Is this even a bug or is the problem with me?

Actions #7

Updated by Garvin Hicking 5 months ago

  • Related to Bug #101883: TypoScript Issue between v11 and v12 added
Actions #8

Updated by Christian Kuhn 5 months ago

  • Related to Bug #104335: Broken state in case of Exception during link building in Menus added
Actions #9

Updated by Daniel Siepmann 5 months ago · Edited

The menu uses the ContentObjectRenderer.
This carries state, e.g. of the current page.

The state is changed for each language/page to generate links for within menus.
If things go bad, the state is kept.
The system might then think that it should render a different page or page in a different language.
That's what was tried to be solved with the commit you've linked.

Actions

Also available in: Atom PDF