[FEATURE] Re-introduce mixed overlay mode for content fallback
This "feature" solves a lot of issues, but I really wanted to make sure
to cover the generic issues around this topic.
In order to understand this, we need to understand the different
logic when talking about "language fallbacks", but I don't want
to warm up how it was before.
This is how it works:
- fallbackChain: defines which page translation should be checked
when linking or resolving a page in a specific language
- fallbackType: Now that we covered all relevant cases, the naming
could be better, but here we go, it's actually defining the logic for fetching
content.
- fallbackType="strict" -> only show the content that is viable in the target language
but this is based on "overlays". Fetch all "language=0" records, do overlays
and remove the ones that have no overlays. However, take the ones that have no
language parent and render them as well ("includeWithoutDefaultTranlsation")
This is what we call "do overlays with floating".
This is recommended to do in most classic translation cases, with different languages
- fallbackType="fallback" -> Do overlays: Fetch all "language=0" records, do overlays
but KEEP the ones that have no overlays. However, take the ones that have no
language parent and render them as well ("includeWithoutDefaultTranlsation")
This is what we call "do overlays in mixed mode".
Useful if your translation is Swiss-German but your default language is "German"
- fallbackType="free" - Do not do overlays, just fetch all records of the target language
Could be seen as "free mode" as we do it in TYPO3 Page module.
The new free option is therefore new, also the "fallback" functionality
is actually showing more content than before (thus, different, but maybe we could fix that!)
as we have the "mixed" mode back.
Also the "language fallback" is now possible for any fallbackType.
Now, what's still missing - but out of scope - is actually a way to fetch content
with multiple possibilities for overlaying. I call this "forward language overlays"
however, this is a feature that is theoretically possible but not in v9 anymore.
This patch restores the max. types of use cases back for TYPO3 Core.
The following things that are really gone for good now and won't come back:
- config.sys_language_mode = ignore
- config.sys_language_mode =
- Option includeRecordsWithoutDefaultTranslation (= always enabled) is not needed anymore
Also, there are no ways anymore to use inconsistent multiple TypoScript settings which
do not make sense depending if the translated page does not exist (l18n_cfg)
but still using TypoScript conditions for that.
Resolves: #86762
Resolves: #86712
Releases: master, 9.5
Change-Id: I8b3144410f7d7ed1d705d42f16a46f190275387a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60367
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Nikolaj Wojtkowiak-Pfänder <nwp@dr-bock.com>
Tested-by: Steven Hilgendorff
Tested-by: Ralf Merz <mail@merzilla.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Nikolaj Wojtkowiak-Pfänder <nwp@dr-bock.com>
Reviewed-by: Ralf Merz <mail@merzilla.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>