Project

General

Profile

Actions

Bug #78654

closed

TMENU: AbstractMenuContentObject->procesItemStates: tests for mconf-state configurations wrongly dotted (mconf wrongly parsed?)

Added by Forty Two about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-11-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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>.'].

Actions #1

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

...

Actions #2

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

Actions

Also available in: Atom PDF