The new Panels (3.8) and CTools (1.8) update gives problems with the Menu Minipanels module. After updating, the select box 'Menu minipanel' under the menu option contains the value 'None' and empty results for each minipanel.

This is caused by the removal of the title property in the minipanel, the title property is renamed to admin_title. So for it to work correctly this needs to be changed in the Menu Minipanels module.

Old:

      // Create options for select box
      $options = array('' => 'None');
      foreach ($panel_minis as $panel_mini) {
        $options[check_plain($panel_mini->name)] = check_plain($panel_mini->title);
      }

New:

      // Create options for select box
      $options = array('' => 'None');
      foreach ($panel_minis as $panel_mini) {
        $options[check_plain($panel_mini->name)] = check_plain($panel_mini->admin_title);
      }

It should now work as before the Panels and CTools update.

Comments

robbertnl’s picture

Assigned: Unassigned » Robert_W

Thanx for the fix Robert. Great work!
Should be tested by the community / developer first before setting to fixed.

willieseabrook’s picture

Status: Fixed » Needs review

Yes, this needs to be included in the next release. I'll close it when I integrate this.

escoles’s picture

Does this affect function -- i.e., if you select one of the empty select-options, will you still have attached a mini-panel to your menu item?

talatnat’s picture

1. I installed Menu Minipanels, 6.x-1.0, CTools 6.x-1.8, and Panels 6.x-3.8, and as reported by the OP, I got the None/Empty select box. (I had already created a Mini Panel to use, but it did not show.)

2. When I first tried the Empty select box, I got a White Screen of Death. The error report:

"Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 261900 bytes) in /media/data/3-www/dr619/sites/all/modules/ctools/includes/plugins.inc on line 103"

3. I manually removed Menu Minipanels, and reloaded a fresh version, but it once again gives a WSOD. This is repeatable in my case: Always an "Allowed memory size" error, though the actual failure seems to happen at different locations (such as includes/bootstrap.inc). I also increased memory size from 128 MB to 256 MB.

4. I switched to CTools 6.x-1.7 and Panels 6.x-3.7, and still get the WSOD. All if fine, if I remove Menu Minipanels.

Where are the Menu Minipanels settings stored in the database? I could not find it in order to delete it (if my choice of an Empty select box is the culprit). If that's not the reason, then I'm obviously filing this in the wrong issue, and I'd appreciate any pointers on how to proceed/troubleshoot-- this module seems to be just what I need...

---------------------------------------

5. Edit/Add: I did add Robert_W's "admin_title" fix after the first WSOD, but it has not helped with the empty select box. For some reason reverting to the older versions of CTools and Panels did not help with the empty select box either, either with or without the admin_ added.

6. Since I was having the same issue as Site logo replaced with Menu Minipanels enabled, I made those patches also since I was adding a Menu Minipanel to a primary menu item. This solved the WSOD issue, but the empty select box remains.

---------------------------------------

7. Edit/Add 2: My Mini Panel is having a "Title" problem (don't know why), so that's why it isn't showing up in Menus Minipanels.

----------------------------------------
8. Edit/Add 3: Re-installed CTools, Panels and Menu Minipanels (with Empty select box fix, and the Site logo patch): The Empty select box is now filled with a Mini Panel title, but on trying to assign a Menu Minipanel block to a primary menu item, I once again get the WSOD.

Any advice, pointers on what may be happening would be great. Thanks.

robbertnl’s picture

Use latest panels and ctools, don't use the primary menu but create your own menu. Use this patch and http://drupal.org/node/948784

robbertnl’s picture

Assigned: Robert_W » Unassigned

Use latest panels and ctools, don't use the primary menu but create your own menu. Use this patch and http://drupal.org/node/948784

robbertnl’s picture

Use latest panels and ctools, don't use the primary menu but create your own menu. Use this patch and http://drupal.org/node/948784

robbertnl’s picture

Use latest panels and ctools, don't use the primary menu but create your own menu. Use this patch and http://drupal.org/node/948784

sammo’s picture

Assigned: Robert_W » Unassigned
Status: Needs review » Closed (duplicate)

Hi I've rolled this into another patch:

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

talatnat’s picture

@sammo: The patch is failing for me -- I'll try it manually later, and test.
Is the patch supposed to work with primary menu or should I try a new menu as robbertnl suggests?
Thanks

sammo’s picture

I've re rolled the patch so you might want to try again. There was a parse error. I am using this with the primary menu so I guess it will work for you. I'm not quite sure how that relates to the issue in this thread though?

talatnat’s picture

Status: Needs review » Closed (duplicate)

@sammo: The patch at http://drupal.org/node/948784#comment-3836822 worked. Thanks.

In my case, the patch for this issue: $options[check_plain($panel_mini->name)] = check_plain($panel_mini->display->title); instead of the original: ($panel_mini->title); still resulted in an empty select box. However, when I used ($panel_mini->admin_title); I got to select a minipanel.

I guess I am doing something incorrect, but when I create a minipanel by adding content menu--> primary links, I still get WSOD.

talatnat’s picture

Status: Closed (duplicate) » Needs review

Just to flag that $panel_mini->display->title in the patch did not work, but $panel_mini->admin_title does work. Please close the issue as a duplicate, I'll post it in the other issue.

jippie1948’s picture

Status: Closed (duplicate) » Needs review

The suggestion in #13 worked for me. Thanks, JanPieter.

willieseabrook’s picture

Assigned: Unassigned » willieseabrook
Status: Needs review » Closed (fixed)

Thanks for the great bug report @Robert_W and your work on it @robbertnl and @sammo!

Small patch committed to dev.

@talatnat if you're still having problems after upgrading to the latest version please open a support request. Looks to me like you were experiencing a bunch of problems - definately a couple with minipanels (should be fixed now) but also php out of memory errors.

talatnat’s picture

Oh, I made the lazy mistake of trying it on an existing site, and there were too many clashes. I've tried it again on a clean install and then migrated it up, and it works just great. A great module, and thanks for all the fixes.