Closed (fixed)
Project:
Menu Block
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2013 at 06:26 UTC
Updated:
14 Nov 2014 at 13:10 UTC
Jump to comment: Most recent
There's a $max_depth parameter of both menu_tree_all_data() and menu_tree_page_data() that we could use to limit the size of the returned menu tree to just those that we need for the configured block. We should use that parameter.
Comments
Comment #1
johnalbinComment #3
coredumperror commentedOne of my sites' menu blocks broke because of this change. Since the "Maximum depth" value from the configure block page had not been in use, we had left it at 1 (might have been the default value? Not sure). This meant that our menu block which used the "Children of active menu item" option started printing a blank menu, since the relevant items were beyond the "Maximum depth" value. Setting "Maximum depth" to 2 fixed it.
This may be mostly our fault for setting the Maximum Depth to 1, but since it worked in the previous version, and broke with 1.4, that's still bad. Maybe add a warning message if any menu blocks are detected with both the "Children of active menu item" and "Maximum depth = 1" options set, since that's guaranteed to be broken?
Comment #4
stefan.r commentedJust a heads up, a patch has been posted in #2283897: "starting level follow active menu item" broken by max_depth variable for the bug this commit has introduced.