[SOLVED] Menu major weirdness

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

[SOLVED] Menu major weirdness

Post 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
Last edited by NikNak on Mon Apr 19, 2010 10:08 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu major weirdness - please help

Post by Dr.CSS »

Do you have a menu call with first level, is it a menu for all second level pages?...
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: Menu major weirdness - please help

Post by NikNak »

Hi there

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

Thanks

Nik
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu major weirdness - please help

Post by Dr.CSS »

So it is a second menu tag in your template?...
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: Menu major weirdness - please help

Post 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
Last edited by NikNak on Fri Apr 16, 2010 3:35 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Menu major weirdness - please help

Post by Rolf »

Do you have a link for us?
And where does it go wrong?

Reg. Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Menu major weirdness - please help

Post 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...
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: Menu major weirdness - please help

Post 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
Last edited by NikNak on Mon Apr 19, 2010 11:46 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] Menu major weirdness

Post 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...
User avatar
NikNak
Forum Members
Forum Members
Posts: 183
Joined: Fri Oct 02, 2009 2:28 pm

Re: [SOLVED] Menu major weirdness

Post 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
Post Reply

Return to “CMSMS Core”