Project

General

Profile

Actions

Bug #48300

closed

Entrylevel wrong when switching languages

Added by Florian Scholz almost 11 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2013-05-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

test_bug_48300.t3d (3.84 KB) test_bug_48300.t3d Alexander Stehlik, 2013-05-31 13:17
Actions #1

Updated by Philipp Gampe almost 11 years ago

  • Status changed from New to Needs Feedback

Are you sure that you created translations for all pages?

Actions #2

Updated by Philipp Gampe almost 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.

Actions #3

Updated by Jochen Weber almost 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...

Actions #4

Updated by Jochen Weber almost 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.

Actions #5

Updated by Alexander Stehlik almost 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/

Actions #6

Updated by Alexander Stehlik almost 11 years ago

To test the problem you have two options:

  1. use config.sys_language_mode = content_fallback; 0
  2. add a language record to the sub root page

I attach a small page tree export where you can test the problem:

  1. in the TYPO3 root create a "Alternative Page Language" record (e.g. English) with UID 2
  2. import the t3d file
  3. navigate to page subroot1 - page 1.1 (has a language record)
  4. append &L=2 to URL

Expected behavior: The menu structure should not change

Current behavior: The menu is now linking to the root pages.

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Florian Scholz almost 11 years ago

Can we please have this in a 6.1.x release? I consider this as a major bug.

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Gerrit Code Review almost 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

Actions #11

Updated by Gerrit Code Review almost 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

Actions #12

Updated by Alexander Stehlik almost 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #13

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF