In D7 you can set a custom 404 page not found node. If this is set the menu's will appear on the site (they won't without this setting). With menu minipanels the menu does indeed show but the mini panels are only shown being empty (so no content in mini panels). As soon as you visit a normal page they work as normal.

No show stopper but something to fix if it's not that hard i guess. Other than this i'm progressing very nicely to use mmp on a D7 site with really enhanced menu's thanks to it! I have also successfully used the API calls to define custom styling :-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Status: Active » Postponed (maintainer needs more info)

Please try the Navigation404 module, see if that fixes the problem.

digibeetle’s picture

I have tried this module and it made no difference (also cleared all caches). I knew about this module and it states you shouldn't need it if you have supplied custom node URL's in the settings page for 404 / access denied. I had already done this which makes the basic menu appear. The associated mmp's however just show up empty (only the panel and background).

DamienMcKenna’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active

I've confirmed this problem exists, and I'll see if I can fix it for the next release candidate.

DamienMcKenna’s picture

This is the same D7 core problem that requires use of Navigation404: core doesn't load the menus on 404 pages, so you need Navigation404 to make them display. At least now I have a direction to focus on, expect a fix this evening :)

DamienMcKenna’s picture

I think I've solved it and, in the process, may have solved some other problems too..

DamienMcKenna’s picture

Currently the module uses hook_init() to identify what menu items require a minipanel to be added, and then it uses hook_page_alter() to add the output. Out of pure curiosity I tried disabling menu_minipanels_init() and executing that functionality through menu_minipanels_page_alter() instead, and it still worked. I've tested it with page caching enabled & disabled, anonymous & authenticated, and tried viewing a few pages (several node pages, /node, /user, /user/register, 404 pages, etc) and it all worked.

DamienMcKenna’s picture

Status: Active » Needs review

I might try this on D6 too..

DamienMcKenna’s picture

Status: Needs review » Reviewed & tested by the community

I also tested this technique with both the Bartik-style theme('links__system_main_menu') and the Boron-style drupal_render(menu_tree_output(menu_tree_page_data())) techniques, so I think this should be good to go.

DamienMcKenna’s picture

Some variations on the technique that I tried on D6 did not work, going to just use it with D7 for now.

DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Ok, I've committed this to the D7 branch.

DamienMcKenna’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Fixed » Patch (to be ported)

Need to work out what to do for D6, there has to be a way around the problem..

digibeetle’s picture

I can confirm RC2 fixes this :-)

robinmcg’s picture

subscribing

DamienMcKenna’s picture

Here's a note I've added to the README.txt file for D7.

Due to a bug/feature in Drupal 7, no menus will be displayed on error pages,
e.g. 404 / File Not Found pages. The best way to resolve this is to use the
Navigation404 module, which will make all menus and minipanels be displayed
again.

DamienMcKenna’s picture

Status: Patch (to be ported) » Needs work

Another two hours of debugging I wasn't able to get the menu_minipanels execution path to work on 404 pages, even when using Blocks404. Am leaving this for now, I might come back to it later.

ryandekker’s picture

Status: Needs work » Needs review
FileSize
615 bytes

Here's a patch that will load the CSS/JS on all 404 pages. Basically, 404s exist because there is not an active menu item, which the rest of the code seems to require (from my testing). This adds a specific use case for pages with no menu item and requires a load.

I feel like this is a decent assumption, chances are good that we want to attach a menu minipanel on all 404 pages to help users find what they're looking for. Worst case, we load files that won't do anything.

If you think there's a strong use case for site builders really not wanting this, we could always add a new config option to disabled it and check for that as well.