Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 :-)
Comment | File | Size | Author |
---|---|---|---|
#16 | minipanels_on_404s-1264738-16.patch | 615 bytes | ryandekker |
#14 | menu_minipanels-n1264738-14-d7.patch | 1.03 KB | DamienMcKenna |
#6 | menu_minipanels-n1264738-d7.patch | 4.46 KB | DamienMcKenna |
Comments
Comment #1
DamienMcKennaPlease try the Navigation404 module, see if that fixes the problem.
Comment #2
digibeetle CreditAttribution: digibeetle commentedI 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).
Comment #3
DamienMcKennaI've confirmed this problem exists, and I'll see if I can fix it for the next release candidate.
Comment #4
DamienMcKennaThis 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 :)
Comment #5
DamienMcKennaI think I've solved it and, in the process, may have solved some other problems too..
Comment #6
DamienMcKennaCurrently 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.
Comment #7
DamienMcKennaI might try this on D6 too..
Comment #8
DamienMcKennaI 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.
Comment #9
DamienMcKennaSome variations on the technique that I tried on D6 did not work, going to just use it with D7 for now.
Comment #10
DamienMcKennaOk, I've committed this to the D7 branch.
Comment #11
DamienMcKennaNeed to work out what to do for D6, there has to be a way around the problem..
Comment #12
digibeetle CreditAttribution: digibeetle commentedI can confirm RC2 fixes this :-)
Comment #13
robinmcgsubscribing
Comment #14
DamienMcKennaHere's a note I've added to the README.txt file for D7.
Comment #15
DamienMcKennaAnother 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.
Comment #16
ryandekker CreditAttribution: ryandekker commentedHere'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.