Project

General

Profile

Actions

Bug #73586

closed

HMENU special = language

Added by Johannes Hahn about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
-
Category:
TypoScript
Target version:
Start date:
2016-02-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

Hi,
there is a bug in HMENU type "special = language".
The default Language (uid=0) is always set to "USERDEF1” / "USERDEF2"

File:
/typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php

Line: 409:
if (GeneralUtility::hideIfNotTranslated($GLOBALS['TSFE']->page['l18n_cfg']) && $sUid && !count($lRecs) || GeneralUtility::hideIfNotTranslated($GLOBALS['TSFE']->page['l18n_cfg']) && (!$sUid || !count($lRecs)) || !$this->conf['special.']['normalWhenNoLanguage'] && $sUid && !count($lRecs)) {
  $iState = $GLOBALS['TSFE']->sys_language_uid == $sUid ? 'USERDEF2' : 'USERDEF1';
 }....

bug:
....  || GeneralUtility::hideIfNotTranslated($GLOBALS['TSFE']->page['l18n_cfg']) && ...

fix:
if (GeneralUtility::hideIfNotTranslated($GLOBALS['TSFE']->page['l18n_cfg']) && $sUid && !count($lRecs) || $GLOBALS['TSFE']->page['l18n_cfg'] && (!$sUid || !count($lRecs)) || !$this->conf['special.']['normalWhenNoLanguage'] && $sUid && !count($lRecs)) {
    $iState = $GLOBALS['TSFE']->sys_language_uid == $sUid ? 'USERDEF2' : 'USERDEF1';
}....                        

  10 = HMENU
  10{
    special = language
    special.value = 0,1
    1 = TMENU
    1 {
        NO
           ....
        ACT < .NO
           ...
        USERDEF1
     }
     #end TMENU 1
  }

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #73518: Disabled menu item state wrong for pages hidden in default languageClosedMathias Brodala2016-02-17

Actions
Actions #1

Updated by Christian Kuhn about 8 years ago

  • Status changed from New to Closed

this was fixed with #73518 some days ago.

Actions

Also available in: Atom PDF