I have followed the installation procedure and created a mini-panel. All settings for menu_minipanel are default.

In Firebug I see this:

Drupal.settings.menuMinipanels is undefined

It relates to this line in menu_minipanels.js:

var settings = Drupal.settings.menuMinipanels.panels[matches[1]]; 

What have I missed?

BTW: thanks for a fantastic idea, this seems to be a very powerful combination and a great, flexible way to create mega menus!

CommentFileSizeAuthor
#10 mm-1.2-JS-error.png35.76 KBachton

Comments

achton’s picture

Status: Active » Needs work

I see the problem now. The module currently only supports megamenus attached to the core Primary or Secondary Links menus.

This is apparent in menu_minipanels_init() in menu_minipanels.module:

<?php

  // Most themes will call primary and secondary links on every page.
  // They are usually themed by a function call inside page.tpl.php so we can't wait until theme_links is called,
  // because by that time, $closure has already been created, and therefore our code would not be included.
  // Therefore, we ought to load any mini panels primary and secondary links may have.
  $primary_links = theme_get_setting('toggle_primary_links') ? menu_primary_links() : array();
  menu_minipanels_preprocess_links_at_init($primary_links);
  $secondary_links = theme_get_setting('toggle_secondary_links') ? menu_secondary_links() : array();
  menu_minipanels_preprocess_links_at_init($secondary_links);
?>

Ideally, the settings page would allow you to select which menus to enable for the module. If no one beats me to it, I will probably submit a patch that does this. Until then, the configuration guide should probably be updated with this info.

Setting this to 'needs work' since the problem is identified.

possum4all’s picture

subscribing

willieseabrook’s picture

Hi @achton

Actually, unless it slipped out from the initial release somehow, menu minpanels does actually support any menu (see hook_theme_registry_alter)

Primary and secondary links are processed separately because they are a special case in which the regular theme registry alter method doesn't work.

Do you have any numbers in your minipanel names. I.E: my_panel_1

There is a known bug with a similar manifestation.

ManchesterNewsGuild’s picture

I have just implemented the menu_minipanels module and am running into this very problem, which is generated in the menu_minipanel.js at line 32. Another error is generated first, which is "Invalid argument" at jquery-qtip-1.0.0-rc3.min.js?c, line 15 character 31447. Despite the errors the minipanel renders in Firefox, Safari, etc., but in IE 8 (surprise!) nothing happens...Is there a fix for it? I've checked everywhere and can't find one. I've almost no experience in js, and ony a little (learning by sight) in php. Also, there is no number in my minipanel name. Any help would be most appreciated. Thanks.

marranca’s picture

Subscribing, also (same issues, and thus far have not identified the cause).

marranca’s picture

Update: if you are encountering this JavaScript error, check the other js and jQuery libraries, as well as associated functions, that are being used by your theme.

Webpage error details

Message: 'Drupal.settings.menuMinipanels.panels' is null or not an object
Line: 32
Char: 5
Code: 0

I have determined the issues in my case were caused by a collision between the Menu Minipanels js file and a jQuery Lavalamp effect I was using in my theme. I commented out the code associated with the Lavalamp effect, and Menu Minipanels instantly worked as expected. Thought I would share immediately, in the event it helps any of you!

sammo’s picture

Status: Needs work » Needs review

Hi I think I have patched this see:

http://drupal.org/node/948784#comment-3823734

willieseabrook’s picture

Status: Needs review » Closed (fixed)

Try the latest dev version with the following environment:

drupal-6.20
ctools-6.x-1.8
panels-6.x-3.8

If you still experience the issue, please reopen.

willieseabrook’s picture

Note you need to save and edit each menu item with a menu minpanel on it to get latest version to work. It's a manual upgrade process.

achton’s picture

Status: Closed (fixed) » Active
StatusFileSize
new35.76 KB

I still experience this issue with 1.2 in the environment mentioned above. I did edit and save each of the two menu items manually. See the attached screenshot from Chrome which points at the specific line in menu_minipanels.js where the code breaks.

Applying my own fix from #1 to the new version of menu_minipanels.module works for me.

To be clear: this pertains only to situations where you wish to apply menu_minipanels to a custom menu. The menu name contains only letters and underscore.

achton’s picture

Version: 6.x-1.0 » 6.x-1.2
Michsk’s picture

Still having this issue, panels 3.9 and this modules latest dev

Michsk’s picture

for me this had to do with: http://drupal.org/node/1257806, after implementing the hardcoded fix the error is gone and it also works with custom menu's

damienmckenna’s picture

Status: Active » Closed (duplicate)

Going to close this as a dupe of #1199790: Support all menus, I'll have a fix for this soon.

dewolfe001’s picture

I just tried the dev version of this module-- http://drupal.org/node/1251450 it seems to have this issue resolved. At least that what I'm finding.

All the best,

Mike