#73586HMENU special = language
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
}Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.