Bug #78654
closedTMENU: AbstractMenuContentObject->procesItemStates: tests for mconf-state configurations wrongly dotted (mconf wrongly parsed?)
0%
Description
TMENU calls procesItemStates to process the item states into the various subsets of NO, ACT, CUR, etc.
typoscript:
10 = HMENU
10 {
special = userfunction
special.root = 220
special.userFunc = Namespace\Extension\Utility\Login->getMenu
1 = TMENU
1 {NO.allWrap = <li>|</li>
ACT.allWrap = <li class="active">|</li>}
}
Resulting mconf-array:
array (
'NO.' => array ('allwrap' => '<li>|</li>'),
'ACT.' => array('allwrap' => '<li class="active">|</li>')
)
All the tests in procesItemStates test without a trailing dot:
if (!empty($this->mconf['ACT'])) { ... }
Consequently, no CUR/ACT/... state is recognized/can be formatted differently.
Most likely, all the tests regarding $this->mconf['<state>'] should be replaced by $this->mconf['<state>.'].
Updated by Forty Two about 8 years ago
- Priority changed from Must have to Should have
Issue can be avoided by adding unintuive value for states:
...
NO.allWrap = <li>|</li>
ACT.allWrap = <li class="active">|</li>
NO = 1
ACT = 1
...
Updated by Wouter Wolters about 8 years ago
- Status changed from New to Rejected
This has always been the case, see our get started TypoScript documentation at https://docs.typo3.org/typo3cms/TyposcriptIn45MinutesTutorial/CreateAMenu/Index.html