In the .install file, there is a handy function called menu_block_fix_custom_menus(). It's invoked on hook_enable.

The problem is that currently the code only allows menu names with the actual word "menu-" in them.

See line 182:

if (!in_array($menu_name, $active_menus) && (strpos($menu_name, 'menu-') === 0)) {

If you are upgrading a site from Drupal 6 to Drupal 7, this is a problem, since your main navigation menu is likely called "primary-links".

Attached patch allows any menu to be set in the menu_default_active_menus variable.

CommentFileSizeAuthor
#1 allow-all-active-menus-1162956-1.patch698 byteskostajh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kostajh’s picture

Status: Active » Needs review
FileSize
698 bytes
mstrelan’s picture

Still not working for me. My menu is primary-links, and I ran this function with this patch and get nothing.

kostajh’s picture

@mstrelan: What is the value of your "menu_default_active_menus" variable?

JohnAlbin’s picture

Status: Needs review » Closed (fixed)

This hack was removed since Drupal core is no longer broken.