Problem/Motivation

Drupal 7.12 contains a bug fix re-enabling the use of custom menus. With this fix, the dependency on the Menu Block module (for its workaround) is no longer needed.

Proposed resolution

Remove the calls to __menu_block_set_menu_trail() no longer defined in the Menu Block 2.3 release designed to work with Drupal 7.12.

As a workaround for people who want to update now to the latest Drupal release, you can apply the change in #7 of #1437160: Dealing with the bug fix in Drupal 7.12 and the change to Menu Block 2.3.

Remaining tasks

Test and commit.

User interface changes

None.

API changes

None.

CommentFileSizeAuthor
#9 accoridon-menu.jpg41.44 KBsimone960
#1 Untitled-1.jpg65.34 KBsimone960

Comments

simone960’s picture

StatusFileSize
new65.34 KB

I'm using drupal 7.12 + Menu Block 7.x-2.3. After installing the accordion menu, could not enable it. Attached is the captured screen.

Will the code provided by #7 solved this issue? If so, which file exactly should I apply to? Please advise.Thanks

Me too!

updating line 99 and 106 to
if (!defined('MENU_PREFERRED_LINK')) {
  __menu_block_set_menu_trail();
}

fixed the WSOD for my pages with an accordion menu on them
ckrina’s picture

Same here. I do not understand how to apply the code of #7, nor the clarification of #12. Neither the latest regular version or the dev one. Thank you.

simone960’s picture

Right, can someone help please. I am in need of this module for my project. Great thanks!

khiminrm’s picture

Hi! I'll describe how I've fixed it.
Download the latest dev version,
open file accordion_menu/includes/view.inc,
replace line 22: __menu_block_set_menu_trail($config['menu_source']);
with: if (!defined('MENU_PREFERRED_LINK')) { __menu_block_set_menu_trail();}
replace line 29: __menu_block_set_menu_trail();
with: if (!defined('MENU_PREFERRED_LINK')) { __menu_block_set_menu_trail();}
save the file.
Then open file accordion_menu.info in the root folder of this module and remove (<7.12) from line 7, (<2.3) from line 9 and save the file.
Now you can enable the module and use it.

ckrina’s picture

Thank you khiminrm, but I still get the white dead screen after apply this changes in pages with an accordion menu block. (Drupal 7.2 + Accordion Menu 7.x-1.0+0-dev + Menu Block 7.x-2.3).

solotandem’s picture

Status: Active » Needs review

ckrina, the fix in #4 does work; you may have needed to clear caches after making the change. The simplest thing to do was to simply delete the lines calling __menu_block_set_menu_trail().

In any case, if you grab the latest dev release, the fix has been committed. If someone will confirm this commit works for them, then I will tag a release as 7.x-1.1.

simone960’s picture

Thanks khiminrm !

It works perfectly!

Hi Solotandem,
Here the drupal framework I'm working on and it works well! Thanks!

Drupal 7.12 + Menu Block 7.x-2.3 + Accordion Menu 7.x-1.x-dev

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

By the way, I'm using module_invoke to display accordion menu in my node template. But I can't find the block id for this menu to be placed at the following code:

 $block = module_invoke('block', 'block_view', ??);
 print $block['content'];

When hovering over the accordion menu's configuration link, I see only the following link, but can't find the block id. Please advise. Thanks.

mydomain/admin/structure/block/manage/accordion_menu/1/configure

solotandem’s picture

simone960, did you try the latest 7.x-1.x release of this module with Drupal 7.12? Menu Block is no longer a dependency. The block IDs are simply integers.

simone960’s picture

StatusFileSize
new41.44 KB

Hi Solotandem,

Yes, I tested on 7.x-1.x-dev (2012-Mar-04) with Drupal 7.12. It works perfectly and as you pointed out, Menu Block is no longer a dependency in this version.

Drupal 7.2 + Menu Block 7.x-2.3 + Accordion Menu 7.x-1.x-dev

Sorry, my previous post on #7 should be Drupal 7.12, not 7.2, I have just corrected it.

ramanirajan’s picture

Hi khiminrm

Thank you very much

i can able to solve error with #4. and now my project run successfully.

ckrina’s picture

Sorry, I used another way to animate the menu. I did not use this module, so I can not check.

mitchmac’s picture

Status: Needs review » Reviewed & tested by the community

In agreement with #9, the dev version works fine with Drupal 7.12.

solotandem’s picture

Status: Reviewed & tested by the community » Fixed

Release 7.x-1.1 created on May 25. Thanks to those who reviewed and commented.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Typo.

Mile3’s picture

Issue summary: View changes

Just posting in a few places for those who may wander looking for a solution to using menu_block with accordion_menu:

A fix is here:

https://www.drupal.org/node/2318861#comment-12256301