Bug #16148

IFSUB and ACTIFSUB of Menus fails with pagetype shortcut as subpage

Added by Franz Koch about 14 years ago. Updated over 8 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


This bug is related due 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 (ISSUB etc.) and therefore needs certain fields in the result row. If these are not part of the values passed in the function call, 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 in the function call are "shortuct" and "shortcut_mode".

(issue imported from #M3493)

tslib_menu.diff View (232 Bytes) Administrator Admin, 2006-08-22 15:55

Related issues

Related to TYPO3 Core - Bug #15931: Menu: IFSUB condition not working correctly (RC3) Closed 2006-04-07
Related to TYPO3 Core - Bug #17632: t3lib_page::getMenu does not check for existance of language overlay Closed 2007-09-27


#1 Updated by Chris Wittmann about 14 years ago

Additional problem to the shortcut bug is that page languages are completely ignored by these to states,... the correct titel is given but if in one language a page exist and in another it does not ifsub is also processed ecenthough in that language are no subpages

#3 Updated by old_FrankDiederichs almost 14 years ago

If the shortcut mode is set to "first subpage" or "random subpage" the patch provided doesn't seem to work. Only if I set the shortcut to a certain page the functionality of the menus' states (ACTIFSUB, IFSUB) is restored. Could someone please verify this behaviour? Maybe there is someting wrong with the fallback behaviour to the current id in case no valid page id can be retrieved.

#4 Updated by Wolfgang Klinger almost 14 years ago

The attached patch should solve the problems, please test and report

@Frank: I can't confirm what you wrote

#5 Updated by Franz Koch over 12 years ago

will this as well as the langOverlay bug with shortcuts be fixed in 4.2.0? Would be very nice, as the bugs are quite old and annoying.

#6 Updated by Stefan Galinski over 8 years ago

  • Category deleted (Communication)
  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Wolfgang Klinger)
  • Target version deleted (0)

The fields shortcut and shortcut_mode are evaluated by the mentioned function in the meanwhile. The report handles several different bugs, so you should open a new report or vote for an existing one if you experience any of the mentioned problems with the current version of TYPO3.

Also available in: Atom PDF