Bug #17632
closedt3lib_page::getMenu does not check for existance of language overlay
0%
Description
Function getMenu in t3lib_page class does not check for existence of current language version. This makes shortcut pages point to pages, that do not have current language version, so user jumps out to default language.
Example case:
- page "A" is configured as shortcut to first subpage, and is made both in default and alternative (L=1) language
- page "B" is first subpage of "A": and is made only in default language.
- page "C" is second subpage of "A": and is made in both languages.
- When using alternative language (L=1) and accessing page "A" typo3 doesn't serve page "C" (in alt language) but page "B" (in default language)
Solution (applied by me to both 3.* and 4.* versions of typo3):
- open file /t3lib/class.t3lib_page.php
- find finction getMenu
- at the end of function body find:
if (is_array($row)) {
$output[$origUid] = $this->getPageOverlay($row);
}
- replace it with:
if (is_array($row)) {
$overlay=$this->getPageOverlay($row);
if($this->sys_language_uid){
if($row!=$overlay)$output[$row["uid"]]=$overlay;
}else{
$output[$row["uid"]]=$overlay;
}
}
I suggest to change it in next version of typo
(issue imported from #M6405)