Project

General

Profile

Actions

Bug #43668

closed

Rootline in TSFE->tmpl is broken when translation is used

Added by Helmut Hummel over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2012-12-06
Due date:
% Done:

100%

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

Description

The fix in #42029 introduced a regression
as TSFE->tmpl->rootLine holds a reversed
rootline array, while in TSFE->rootLine
the order is "normal"

Additionally the call to getPageOverlay was wrong
because the result of the overlay was never used.


Files

rootline_bug.jpg (84.6 KB) rootline_bug.jpg Sven Wappler, 2013-03-03 22:45

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #44312: Sliding levelmedia not working for alternate languages in 6.0.0Closed2013-01-04

Actions
Related to TYPO3 Core - Bug #49827: Rootline in TSFE->tmpl is broken when translation is used and is_siteroot is set in betweenClosed2013-07-09

Actions
Has duplicate TYPO3 Core - Bug #44311: Menustate CUR not working for translations in 6.0.0Closed2013-01-04

Actions
Actions #1

Updated by Gerrit Code Review over 11 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16992

Actions #2

Updated by meolus over 11 years ago

EDIT: The patch from above solves my both problems!

I'm using TYPO3 6.0 and tested TYPO3 6.1-dev from yesterday, but I have similar problems with rootlines and translations. My first problem was, that the following TS snippets don't return the correct translation (they always return the translation in default language):

something = TEXT
something.data = leveltitle:1

respectively

somethingOther = TEXT
somethingOther.data = fullRootLine:1, title

My searching endet up in #42029. Undoing the changes in typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php resolved my problem for now, but I am not sure about it:

// Updating content of the two rootLines IF the language key is set!
if ($this->sys_language_uid && is_array($this->tmpl->rootLine)) {
foreach ($this->tmpl->rootLine as $rLk => $value) {
$this->tmpl->rootLine[$rLk] = $this->sys_page->getPageOverlay($this->tmpl->rootLine[$rLk]);
}
//$this->tmpl->rootLine = $this->sys_page->getRootLine($this->id, $this->MP);
}
if ($this->sys_language_uid && is_array($this->rootLine)) {
foreach ($this->rootLine as $rLk => $value) {
$this->rootLine[$rLk] = $this->sys_page->getPageOverlay($this->rootLine[$rLk]);
}
//$this->rootLine = $this->sys_page->getRootLine($this->id, $this->MP);
}

(relating to Patch of #42029).

Additional I've a problems with translations and realurl, just like #42880, too. So I don't think it was fixed.

Actions #3

Updated by Sengchheang Chhun over 11 years ago

The path solves my problem too.

I wrote TypoScript (HMENU, special=rootline) to output breadcrumb.
In English, the breadcrumb is like this:
Home > Contact > Sub of Contact

But in translated version:
Sub of Contact > Contact > Home

After patching, it is working now.

Actions #4

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/16992

Actions #5

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/16992

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/16992

Actions #7

Updated by Gerrit Code Review over 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/16992

Actions #8

Updated by Gerrit Code Review over 11 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/16992

Actions #9

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/17475

Actions #10

Updated by Helmut Hummel over 11 years ago

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

Updated by Sven Wappler about 11 years ago

Only meolus patch (Note #2) solves the problem for me. Please patch the core with his suggestion.

Actions #12

Updated by Helmut Hummel about 11 years ago

Sven Wappler wrote:

Only meolus patch (Note #2) solves the problem for me. Please patch the core with his suggestion.

Can you explain you exact problem you have with TYPO3 6.0.2 regarding rootline and translations?

Actions #13

Updated by Sven Wappler about 11 years ago

If I do not use the patch, I see only the first page on level 0 when switching to another language. Once I use the patch, all translations are available and the pages are accessible.
Therefore I wonder why it functions for you without the patch.

Actions #14

Updated by Helmut Hummel about 11 years ago

Sven Wappler wrote:

If I do not use the patch, I see only the first page on level 0 when switching to another language.

Where do you see only the root level page? In the menu?
What exact setup do you have?

Once I use the patch, all translations are available and the pages are accessible.
Therefore I wonder why it functions for you without the patch.

What exact TYPO3 Version are you referring to and what exact patch on top of that version helps?

Actions #15

Updated by Sven Wappler about 11 years ago

TYPO3 version: 6.0.0 - 6.0.2 and master.
The patch for typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php function updateRootlinesWithTranslations()

Changing

if ($this->sys_language_uid && is_array($this->tmpl->rootLine)) {
  $this->tmpl->rootLine = $this->sys_page->getRootLine($this->id, $this->MP);
}
if ($this->sys_language_uid && is_array($this->rootLine)) {
  $this->rootLine = $this->sys_page->getRootLine($this->id, $this->MP);
}

to
if ($this->sys_language_uid && is_array($this->tmpl->rootLine)) {
  foreach ($this->tmpl->rootLine as $rLk => $value) {
    $this->tmpl->rootLine[$rLk] = $this->sys_page->getPageOverlay($this->tmpl->rootLine[$rLk]);
  }
}
if ($this->sys_language_uid && is_array($this->rootLine)) {
  foreach ($this->rootLine as $rLk => $value) {
    $this->rootLine[$rLk] = $this->sys_page->getPageOverlay($this->rootLine[$rLk]);
  }
}

I added a screenshot which is showing the problem.

Actions #16

Updated by André Steiling about 11 years ago

I got the same behaviour as Sven Wappler descriped. Without changing typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php function updateRootlinesWithTranslations() I only see the defined rootline pages and not my menus!

I work with TYPO3 6.0.4 and

config {
linkVars = L(0|1)
uniqueLinkVars = 1
sys_language_uid = 0
language = de
locale_all = de_DE.UTF-8
sys_language_mode = default
}

After patching updateRootlinesWithTranslations() my menus work as expected, but my translated content is not shown on a translated page - a next issue ...

Actions #17

Updated by Sven Wappler almost 11 years ago

Will this bug be fixed? It does still exist in 6.1.0. Please reopen this bug.

Actions #18

Updated by Martin Holtz almost 11 years ago

Sven Wappler wrote:

Will this bug be fixed? It does still exist in 6.1.0. Please reopen this bug.

IMHO this bug is fixed, but there is another bug which depends on is_siteroot is not set on the root page, but somewhere in the rootLevel. I filled a new bug report: [[http://forge.typo3.org/issues/49827]] Seems that you have the same problem.

Actions #19

Updated by Sven Wappler over 10 years ago

Ok, it seems that this bug is now finally fixed in 6.1.2

Actions #20

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF