Solved: start_level parameter in menumanager after upgrade 1.4.1 to 1.6.5

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
hansvd
New Member
New Member
Posts: 2
Joined: Sun Sep 06, 2009 5:29 pm

Solved: start_level parameter in menumanager after upgrade 1.4.1 to 1.6.5

Post by hansvd »

After upgrading from 1.4.1 to 1.6.5, all sites where I used the start_level parameter to show a second level menu in the left bar, were no longer showing the menu. In fact, as soon as I used the parameter start_level in a menu call, that menu disappeared.

Example of the code I used in my template

Code: Select all

<div id="menu_vert">
{menu template='simple_navigation.tpl' start_level='2' number_of_levels='1' collapse='1'}
</div>
When looking at differences in action.default.php (in modules/MenuManager) between 1.4.1 and 1.6.5, I found that I could resolve the issue by taking out the if statement at line 98, reverting that portion to the 1.4.1 version

Code: Select all

			$curcontent =& $curnode->GetContent();
//			if( !$curcontent )  {
			  $properparentpos = $this->nthPos($curcontent->Hierarchy() . '.', '.', intval($params['start_level']) - 1);
			  if ($properparentpos > -1)
			  {

			    $prevdepth = intval($params['start_level']);
			    $rootnode =& $hm->getNodeByHierarchy(substr($curcontent->Hierarchy(), 0, $properparentpos));
			  }
 //                       }
In fact, I have no clue what I have been doing here. As such, I would appreciate it if someone explained the necessity of this if-condition.
Last edited by hansvd on Sun Sep 06, 2009 6:35 pm, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Issue with start_level parameter in menumanager after upgrade 1.4.1 to 1.6.5

Post by RonnyK »

hansvd
New Member
New Member
Posts: 2
Joined: Sun Sep 06, 2009 5:29 pm

Re: Issue with start_level parameter in menumanager after upgrade 1.4.1 to 1.6.5

Post by hansvd »

Ronny,

Thanks a lot. I did a search in the forum to see if there were related post, but apparently I should have checked better.

Hans
Locked

Return to “[locked] Installation, Setup and Upgrade”