Page 1 of 1

[SOLVED] Menu major weirdness

Posted: Thu Apr 15, 2010 5:11 pm
by NikNak
Hi

Im running cmsms v1.7 and my website was all running fine. But after working on the site today I noticed that on my first page the menu had disappeared. Now after a lot of panic and trying this and that I have found that the menu command {menu start_level="2"} no longer works on a page in friendly position 1 ie the first page. (there are subpages that should show).

Using {get_template_vars} on a page with only {menu start_level="2"} in the template I get this output in friendly position 1

SCRIPT_NAME = /index.php
app_name = CMS
sitename = name
lang =
encoding = utf-8
gCms = Object
cgsimple = Object
feu_smarty = Object
content_obj = Object
content_id = 496
page = ignore
page_id = ignore
page_name = ignore
page_alias = ignore
position = 00001
friendly_position = 1


But if I move it to friendly position 2 it now works and I get my menu:

SCRIPT_NAME = /index.php
app_name = CMS
sitename = name
lang =
encoding = utf-8
gCms = Object
cgsimple = Object
feu_smarty = Object
content_obj = Object
content_id = 496
page = ignore
page_id = ignore
page_name = ignore
page_alias = ignore
position = 00002
friendly_position = 2
menuparams = Array (3)
count = 1
nodelist = Array (1)
node = Object


This seems super weird, as all was working fine. I cannot think of anything in the rest of my site that could be causing this. I've tried the minimal template menu, and as above with a bare bones template and virtually no content.

Any clues?

Currently it seems I have to have an inactive page for page 1 to get my site back and running.

Many thanks

Nik

Re: Menu major weirdness - please help

Posted: Thu Apr 15, 2010 5:13 pm
by Dr.CSS
Do you have a menu call with first level, is it a menu for all second level pages?...

Re: Menu major weirdness - please help

Posted: Thu Apr 15, 2010 5:16 pm
by NikNak
Hi there

Yes - it is just building a second level menu - ie just child pages

Thanks

Nik

Re: Menu major weirdness - please help

Posted: Thu Apr 15, 2010 5:21 pm
by Dr.CSS
So it is a second menu tag in your template?...

Re: Menu major weirdness - please help

Posted: Thu Apr 15, 2010 5:25 pm
by NikNak
Sorry - I didnt get your meaning.

In the main pages where the problem was first noticed, yes it is a second call to the {menu} but in the test scenario shown above, it was the only call.

If i use {menu start_level=1} I get the full listing inc sub pages but {menu start_level=2} doesnt anymore.


Many thanks

Nik


ADDED 16 April
I have a hunch this isn't going to get solved

Re: Menu major weirdness - please help

Posted: Sun Apr 18, 2010 3:50 pm
by Rolf
Do you have a link for us?
And where does it go wrong?

Reg. Rolf

Re: Menu major weirdness - please help

Posted: Sun Apr 18, 2010 4:21 pm
by Dr.CSS
The {menu} tag assumes you are going to start at the first level so no need for start_level='1', start_level='2' only shows second level menu items if the page you are on has them, if you are on home page and it doesn't have any chaildren it won't show anything...

Re: Menu major weirdness - please help

Posted: Mon Apr 19, 2010 10:07 am
by NikNak
Thanks Dr CSS

There are subpages which I needed to show hence the need for start_level 2

HOWEVER - THIS HAS BEEN SOLVED AT LAST!!!!!

I had been trying out Xcontent. By a long long process of elimination, I have discovered that the page numbers which should have been unique weren't!! ie- there were multiple pages with the same friendly position - this was totally screwing up the menu manager.  I still need to try and work out what has actually happened though now, so I can recover my site to its former state.

(ADDENDUM: See post below - it was ContentAliases not Xcontent causing the glitch)

Thanks

Nik

Re: [SOLVED] Menu major weirdness

Posted: Mon Apr 19, 2010 10:51 am
by Dr.CSS
If you get a bunch of pages with the same number like 3 you can always try using the reorder pages button, I've it fix page number problems by just hitting the button and looking at the pages order then hit submit and then all the pages had the right numbers...

Re: [SOLVED] Menu major weirdness

Posted: Mon Apr 19, 2010 11:45 am
by NikNak
The problem pages were not even showing in the page list, so I couldn't delete them, but thanks for the tip. 

It turns out it wasn't XContent but the errant pages were of type ContentAlias - a module I had tried out. The only way I could find them was using phpMyAdmin.

Kind regards

Nik