Bug #17354

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

Added by Daniel Poetzinger about 14 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
Start date:
2007-07-22
Due date:
% Done:

90%

Estimated time:
50.00 h
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
nightmare
Is Regression:
No
Sprint Focus:

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)


Files

patch_class.t3lib_page.txt (3.05 KB) patch_class.t3lib_page.txt Administrator Admin, 2007-07-22 14:08
patch_class.tslib_fe.txt (3.13 KB) patch_class.tslib_fe.txt Administrator Admin, 2007-07-22 14:09
patch_class.tslib_menu.txt (889 Bytes) patch_class.tslib_menu.txt Administrator Admin, 2007-07-22 14:09
T3X_danp_languagefallback_patch-0_0_0-z-200708151515.t3x (7.93 KB) T3X_danp_languagefallback_patch-0_0_0-z-200708151515.t3x Administrator Admin, 2007-08-23 16:14
6009_dmitry.diff (1.37 KB) 6009_dmitry.diff Administrator Admin, 2011-03-10 15:35
l10nFallback.patch (9.66 KB) l10nFallback.patch Stefan Galinski, 2012-03-22 15:10
l10nFallback.patch (8.71 KB) l10nFallback.patch Stefan Galinski, 2012-03-28 13:30
modifications_6-2-12.txt (21.3 KB) modifications_6-2-12.txt GRiDDS GmbH, 2016-10-14 13:34
test_modifications_6-2-27.txt (29.9 KB) test_modifications_6-2-27.txt GRiDDS GmbH, 2016-10-14 13:34
additional_modification.txt (1.24 KB) additional_modification.txt GRiDDS GmbH, 2016-10-14 13:34
BUGFIX-17354-fallback-for-menus-content_fallback-7_6-.patch (37.9 KB) BUGFIX-17354-fallback-for-menus-content_fallback-7_6-.patch Nikolaj Wojtkowiak-Pfänder, 2016-11-18 09:23
DifferentLanguageFallbackThenDefaultLanguageForPages.patch (32.4 KB) DifferentLanguageFallbackThenDefaultLanguageForPages.patch Alex Kellner, 2018-10-30 14:48

Related issues

Related to TYPO3 Core - Bug #19114: sys_language_mode content_fallback with a defined fallback chain does not output expected fallback content Closed2008-07-16

Actions
Related to TYPO3 Core - Bug #19718: Typoscript: CONTENT | slide: multilanguage not correctly respected in content_fallback modeUnder ReviewBenni Mack2008-12-18

Actions
Related to TYPO3 Core - Bug #36616: TYPO3 4.7 sectionIndex not working correctly on multilanguage siteClosedStefan Galinski2012-04-26

Actions
Related to TYPO3 Core - Bug #48673: Changed language overlay behaviour in TYPO3 6.*Closed2013-05-30

Actions
Related to TYPO3 Core - Bug #53120: Proper fetching of records in a language in the fallback-chainClosed2013-10-25

Actions
Related to TYPO3 Core - Bug #72834: sys_language_mode = content_fallback ; 1,0 is not working with ExtbaseClosed2016-01-20

Actions
Related to TYPO3 Core - Bug #81657: TSFE->page contains default language page when content_fallback; 1,0 is usedClosed2017-06-21

Actions
Has duplicate TYPO3 Core - Bug #20623: content_fallback for whole page, including navigation and titleClosedBenni Mack2009-06-16

Actions
Has duplicate TYPO3 Core - Bug #60052: sys_language_mode=content_fallback only supports language uid 0 as fallbackClosed2014-07-02

Actions

Also available in: Atom PDF