#17354fallback for menus. "content_fallback;1,0" has no affect for page records (e.g. menu)
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
Related issues 7
- Bug #19114sys_language_mode content_fallback with a defined fallback chain does not output expected fallback content
- Bug #19718Typoscript: CONTENT | slide: multilanguage not correctly respected in content_fallback mode
- Bug #36616TYPO3 4.7 sectionIndex not working correctly on multilanguage site
- Bug #48673Changed language overlay behaviour in TYPO3 6.*
- Bug #53120Proper fetching of records in a language in the fallback-chain
- Bug #72834sys_language_mode = content_fallback ; 1,0 is not working with Extbase
- Bug #81657TSFE->page contains default language page when content_fallback; 1,0 is used