Bug #48300
closedEntrylevel wrong when switching languages
100%
Description
In a multi-language setup, I get different entrylevel outputs when switching from the default language (German) to another language (English)
Defined value is entrylevel = 1, however the English version behaves like there would have been set entrylevel = 0 in the TypoScript.
Any ideas?
Language settings:
config { linkVars = L htmlTag_langKey = de_DE sys_language_uid = 0 language = de locale_all = de_DE sys_language_overlay = 1 } // Language Englisch [globalVar = GP:L = 1] config.linkVars = L config.sys_language_uid = 1 config.language = en config.locale_all = en_GB config.htmlTag_langKey = en_GB [global]
Menu TypoScript:
SUBNAVI = COA_INT SUBNAVI = HMENU SUBNAVI { entryLevel = 1 1 = TMENU 1 { wrap = <ul class="subMnu">|</ul> noBlur = 0 NO = 1 NO.wrapItemAndSub = <li class="subMnuSingleBlue">|</li> CUR < .NO CUR.ATagParams = class="act" IFSUB = 1 IFSUB.wrapItemAndSub = <li class="subMnuBlue">|</li> CURIFSUB < .IFSUB CURIFSUB.ATagParams = class="act" ACT = 1 ACT < .NO ACTIFSUB < .CURIFSUB } 2 = TMENU 2 { wrap = <ul class="subMnu">|</ul> NO = 1 NO.wrapItemAndSub = <li class ="subMnuGrey">|</li> CUR < .NO CUR.ATagParams = class="act" ACT = 1 ACT < .CUR } }
(c.f. http://www.typo3.net/forum/beitraege/mehrsprachigkeit/114479/)
Files
Updated by Philipp Gampe over 11 years ago
- Status changed from New to Needs Feedback
Are you sure that you created translations for all pages?
Updated by Philipp Gampe over 11 years ago
I can not reproduce this. Please share more details, best would be an export of a sample page tree including the TS.
Updated by Jochen Weber over 11 years ago
same issue.
when i increment the entryLevel within a condition to the language(!=0), everything works like expected.
i also disabled the realurl-extension to exclude this. i will create an sample export next days...
Updated by Jochen Weber over 11 years ago
the range of "special = rootline" also starts at the wrong point.
i defined a page with "is_siteroot", but in a other language as default, it is ignored.
Updated by Alexander Stehlik over 11 years ago
I think i found the Problem in
\TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::updateRootLinesWithTranslations()
In this method the rootline of the template is overwritten which look pretty dirty to me:
$this->tmpl->rootLine = array_reverse($this->sys_page->getRootLine($this->id, $this->MP));
The rootline of the template should be initialized by passing it to the start()
method of the TemplateService
(\TYPO3\CMS\Core\TypoScript\TemplateService::start($theRootLine)
). Otherwise configuration options like "root" of the template are totally ignored.
The change was commited with 51f41665 and reviewed here: https://review.typo3.org/#/c/16992/
Updated by Alexander Stehlik over 11 years ago
- File test_bug_48300.t3d test_bug_48300.t3d added
To test the problem you have two options:
- use
config.sys_language_mode = content_fallback; 0
- add a language record to the sub root page
I attach a small page tree export where you can test the problem:
- in the TYPO3 root create a "Alternative Page Language" record (e.g. English) with UID 2
- import the
t3d
file - navigate to page subroot1 - page 1.1 (has a language record)
- append
&L=2
to URL
Expected behavior: The menu structure should not change
Current behavior: The menu is now linking to the root pages.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21174
Updated by Florian Scholz over 11 years ago
Can we please have this in a 6.1.x release? I consider this as a major bug.
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21174
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21174
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/21449
Updated by Alexander Stehlik over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d5b2763d018f256f99120db69f9f0af2f65635e3.