[TYPO3-content-rendering] Bug in IFSUB and ACTIFSUB in TMENUS

Franz Koch typo3 at fx-graefix.de
Thu May 11 13:41:53 CEST 2006


> Typo3 seems to misbehave on menu conditions IFSUB and ACTIFSUB. If a 
> page has only pages of type "shortcut" as subpages, the conditions IFSUB 
> and ACTIFSUB don't apply for the parent page. Can anybody else confirm 
> this as a bug? I found that another developer asked the same question in 
> dev-list about a month ago (concerning RC3).

After a longer debugging session I found the bug. It's related to missing SQL-Query-Result fields in the function "getMenu()" (in class.t3lib_page.php) called by function "isSubMenu" from "class.tslib_menu.php". The function getMenu provides a function-variable (operator? - I'm no developer) in which the whished fields for the result rows can be given. Nice feature, but the problem is that the function also does the submenu check and therefore needs certain fields in the result row. If these are not part of the values passed in the functioncall, those checks will always fail (which currently does).

Therefore there are 2 possible solutions:
either parse the field-values passed to the function variable with a t3lib_div::uniqueInList($passed_fields.",".$required_fields_by_function_itself) or simply add those fields to the functioncall in line 1343 of class "class.tslib_menu.php".

The missing fields are btw "shortuct" and "shortcut_mode".
-- 
Kind regards,
Franz Koch



More information about the TYPO3-project-content-rendering mailing list