Issue Feature Under Review

#111386Introduce fallbackType "connected" driven by the language fallback chain

Benni Mack 11/09/26, 16:42 updated 11/18/26, 07:06

Description

Problem

Two settings of a site language decide how translations are shown in the frontend, and they interact in ways that are hard to predict:

  • fallbackType (strict, fallback, free) decides for content elements: strict hides untranslated elements, fallback shows them in the default language.
  • fallbacks (the fallback chain) decides for pages: a page without translation is looked up along the chain; with 0 in the chain it is rendered in the default language, otherwise “page not found”.

Page links to untranslated pages are refused for strict and generated for fallback, independent of the chain. This leads to inconsistent combinations:

Configuration Untranslated page Untranslated element on a translated page Links to untranslated pages
strict, chain without 0 (default) 404 hidden refused
strict, chain with 0 rendered in default language hidden refused, although the page renders
fallback, chain with 0 rendered in default language shown in default language generated
fallback, chain without 0 (also empty fallbacks) 404 shown in default language generated, but lead to a 404

Solution

Introduce fallbackType: connected, where the fallback chain decides for pages, content elements and links alike:

  • Pages: as today, a translation is looked up along the chain; 0 renders the page in the default language, otherwise “page not found”.
  • Content elements: the translation into the requested language, otherwise a translation into a language of the chain, otherwise the default language record, only if 0 is in the chain. Records without default language record (“floating” records) are always included. This also applies to Extbase.
  • Page links are generated if the target page would be rendered.
  • fallbackType: free stays as it is.

LanguageAspectFactory maps connected to OVERLAYS_MIXED if the chain contains 0, otherwise to OVERLAYS_ON_WITH_FLOATING. PageLinkBuilder uses the chain instead of checking for fallbackType === 'strict'. The site module offers connected and free. The name matches the backend’s “connected mode” versus “free mode” of translations.

Migration (Breaking)

strict and fallback are converted on the fly when the site configuration is read; no upgrade wizard writes site configuration files (they are often versioned, use imports or placeholders, or are read-only). A missing fallbackType means connected with the fallback chain as configured.

Today With connected Visible change
strict, chain without 0 chain unchanged none
fallback, chain with 0 chain unchanged none
fallback, chain without 0 0 is appended untranslated pages render in the default language instead of 404
strict, chain with 0 0 is removed untranslated pages result in 404 instead of rendering

Translated pages render as before in all cases. SiteLanguage::getFallbackType() and sitelanguage:fallbackType return connected for converted languages.

Configurations that cannot be expressed anymore:

  • Untranslated pages “not found”, but untranslated elements on translated pages shown in the default language (today: fallback without 0).
  • Untranslated pages rendered in the default language, but untranslated elements on translated pages hidden (today: strict with 0).
  • Fallback chain for pages only, while elements are only shown in their own language (v11/v12.1 behavior of strict, see #110008).

Prepared by #111326, #111329 and #111336.

Reviews 2

History 012