Closed (fixed)
Project:
Megamenu
Version:
6.x-2.0-beta2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2011 at 09:56 UTC
Updated:
21 Jun 2011 at 23:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
SophieG commented+1
Comment #2
kevinquillen commentedLooks like its because _megamenu_get_menu_tree is using menu_tree_all_data to build the menu which returns an entire menu tree, and the loop after it is not effectively removing it from the array if hidden == 1, especially root level parent items.
Comment #3
vamu commentedThis is due to a spelling error on line 58 in megamenu.utilities.inc
Should be
if ($tier_1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
unset($menutree[$tier_1_key]);
}
Comment #4
code-brighton commentedvalue and key variable names are incorrect, edit the following lines in megamenu.utilities function _megamenu_get_menu_tree
change:
if ($tier1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
unset($menutree[$tier1_key]);
}
to:
if ($tier_1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
unset($menutree[$tier_1_key]);
}
Comment #5
sravanglitter commentedI have tested the above comment #4 and its working well for me. Here is an attached patch file for the solution given in comment #4 above and the version is 6.x-2.x.
Comment #6
jim kirkpatrick commentedWorks for me...
Comment #7
Anonymous (not verified) commentedThanks code-brighton and sravanglitter. Commited to 6.x-2.x in 399e0b7
Comment #8
HippoOnDiet commentedI tried to install MegaMenu 6.2.x dev and got an error message about line 62:
Parse error: syntax error, unexpected T_ELSE sites/all/modules/megamenu/megamenu.utilities.inc on line 62
Checked on megamenu.utilities.inc and found the issue on line 61.
58. if ($tier_1_item['link']['hidden'] == 1 || empty($tier_1_item['link']['link_title'])) {
59. unset($menutree[$tier_1_key]);
60. }
61. } //Delete this, too much close bracket
62. else {
63. if ($tier_1_item['below']) {