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.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | accoridon-menu.jpg | 41.44 KB | simone960 |
| #1 | Untitled-1.jpg | 65.34 KB | simone960 |
Comments
Comment #1
simone960 commentedI'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
Comment #2
ckrinaSame 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.
Comment #3
simone960 commentedRight, can someone help please. I am in need of this module for my project. Great thanks!
Comment #4
khiminrm commentedHi! 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.
Comment #5
ckrinaThank 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).
Comment #6
solotandem commentedckrina, 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.
Comment #7
simone960 commentedThanks 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:
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
Comment #8
solotandem commentedsimone960, 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.
Comment #9
simone960 commentedHi 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.
Sorry, my previous post on #7 should be Drupal 7.12, not 7.2, I have just corrected it.
Comment #10
ramanirajan commentedHi khiminrm
Thank you very much
i can able to solve error with #4. and now my project run successfully.
Comment #11
ckrinaSorry, I used another way to animate the menu. I did not use this module, so I can not check.
Comment #12
mitchmac commentedIn agreement with #9, the dev version works fine with Drupal 7.12.
Comment #13
solotandem commentedRelease 7.x-1.1 created on May 25. Thanks to those who reviewed and commented.
Comment #14.0
(not verified) commentedTypo.
Comment #15
Mile3 commentedJust 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