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

JohnAlbin’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

coredumperror’s picture

Issue summary: View changes

One 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?

stefan.r’s picture

Just 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.