Issue Bug Closed

#17354fallback for menus. "content_fallback;1,0" has no affect for page records (e.g. menu)

Daniel Poetzinger 07/22/07, 14:08 updated 05/07/19, 12:17

Description

Problem:
It is not possible to define another that default language as fallback.
This is what TYPO3 does actual:
you can define
config.sys_language_mode=content_fallback;1,0

What this does is to set
$this->sys_language_content in tslib_fe.

So only the content is rendered in a alternative fallback language.

- menues fall back to default
- page title fall back to default

So this is not perfect, cause it makes no sense if menues and pagedata fall back to default but content is shown in another fallback language.

Example:
say you have default=english / 1 = spanish / 2=catalan (spanish language)

typical setting if L=2:
config {
sys_language_uid = 2
sys_language_mode=content_fallback;1,0
}

if you view a page where no catalan version is available TYPO3 shows menu title and pagetitle of defaultlanguage and only the content in spanish.
(What is far from perfect and not the expected behaviour)

Solution:
- It is neccessary that other functions in the core know a fallbackorder.
- especially the function t3lib_page::getPageOverlay needs to know alternative fallback language uids.

I recommend to introduce a new configuration:
config.sys_language_fallBackOrder=1,0
(which is used as general fallbackorder)

Attached a patch with the following changes:
t3lib_page:
1) new function getLanguageOverlayUidForPage($page_id,$fallBackOrder)
(function that checks which page record overlay language should be used, according to the given fallbackorder)
2) adjust getPageOverlay to use fallback uid instead of default

tslib_fe
1) settingLanguage():
set $this->sys_language_overlayCheckOrder
load fallback overlay for actaul page if needed

tslib_menu
1) adjust filterMenuPages to work with the changes

view attached patches
(i use head of branch 4.1)
(issue imported from #M6009)

Reviews 1