-
AuthorPosts
-
December 30, 2010 at 5:00 am #158072
I unpublished all the items in “Main Menu” and “topmega” and get this error above my actual main menu (magazine)
How can I disable those menus without getting this error?
Phan Gam FriendPhan Gam
- Join date:
- June 2008
- Posts:
- 216
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 4
- Thanked:
- 39 times in 38 posts
December 31, 2010 at 8:34 am #369486Hi,
Thank for your report.
Please fix it as follows:
#1. Open base.class.php file under pluginssystemjat3coremenu
#2. Goto about line 160, for code loadMenu() function, searching for code block belows:
// search the active tree
$open = array();
$active = $menu->getActive();
if (isset($active)) {
if ($active->menutype != $this->getParam('menutype')) {
//detect the active in this menu: point to same link or is alias
foreach ($rows as $index => $v) {
if (($v->link == $active->link)
|| ($v->type == 'menulink' && !empty($v->query['Itemid']))
) {
$open = array_reverse($v->tree);
break;
}
}
} else {
$open = array_reverse($active->tree);
}
}
$this->open = $open;if(!count($rows)) return;
Arround line 54 to 74
#3. and change to
if(!count($rows)) return;
// search the active tree
$open = array();
$active = $menu->getActive();
if (isset($active)) {
if ($active->menutype != $this->getParam('menutype')) {
//detect the active in this menu: point to same link or is alias
foreach ($rows as $index => $v) {
if (($v->link == $active->link)
|| ($v->type == 'menulink' && !empty($v->query['Itemid']))
) {
$open = array_reverse($v->tree);
break;
}
}
} else {
$open = array_reverse($active->tree);
}
}
$this->open = $open;
Hope that helps1 user says Thank You to Phan Gam for this useful post
-
AuthorPosts
This topic contains 2 replies, has 2 voices, and was last updated by Phan Gam 14 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum