Archived CMSimple Support Forum

The Old CMSimple User Community
It is currently Thu Sep 02, 2010 4:37 pm

This archived CMSimple Support Forum will be locked primo June 2008. Users with a commercial licence are advised to register and use the new Official Support Forum at CMSimple.com instead. A community driven forum with free registration is found at cmsimpleforum.com.

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Bug in PARENT function
PostPosted: Wed Aug 08, 2007 10:32 pm 
Offline

Joined: Tue Sep 14, 2004 5:21 pm
Posts: 1210
Location: Germany: Unterfranken
I believe there is a bug in the parent function if one uses more than 3 menu levels.

To show whats happening go to:http://riehl.cylog.de/?Heading:Another_H2_Heading:An_H3_heading3

You see on the top of the main page a line of H3 heading buttons and a line of H4 heading buttons below of it. If you press one of the H4 buttons, not only the "An H3 heading3" button stays highlighted (which is supposed to stay highlighted), but the very first H3 button "An H3 heading" becomes highlighted, too. This very first button turns from "class=docs" to "class=sdocs", although it is not "sdocs". If I remove the H4 heading from the very first button, this button turns from "class=doc" to "class=sdoc" and becomes highlighted as well.

I am using CMSimple v.2.9 and see this bug on WAMP and LAMP servers.

Please, how can I solve this (w/o using the option of not using H4 menu levels)?

Till

PS: Sorry the website is not online anymore. The endproduct can be seen at http://www.riehl-partner.de


Last edited by till on Mon Aug 13, 2007 7:02 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 09, 2007 7:47 am 
Offline

Joined: Tue Sep 14, 2004 5:21 pm
Posts: 1210
Location: Germany: Unterfranken
I think I found out myself, how to circumvent this bug(?). If I change the H3 heading "An H3 heading" to "An H3 heading1" by adding the number "1", the menu reacts as wanted - the bug disappears. Why is "An H3 heading" and "An H3 heading3" the same heading? CMSimple itself accepts it. Can anybody explain it to me, please?

Till


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 09, 2007 8:06 am 
Offline

Joined: Wed Dec 31, 2003 1:07 pm
Posts: 2494
Location: planet earth
-
Sounds like the regular expression is incorrect. I read about stylesheets in the headings, perhaps the "old" expression was changed due to that and is incorrect now.

djot
-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 09, 2007 11:00 am 
Offline
Site Admin

Joined: Mon May 12, 2003 12:36 pm
Posts: 3091
Location: Rutsker, Bornholm, Denmark
It is this code doing it:

Code:
         if ($l[$ta[$i]] < $l[$s]) {
            if (substr($u[$s], 0, strlen($u[$ta[$i]])) == $u[$ta[$i]])$t .= 's';
         }


It is because Heading:Another_H2_Heading:An_H3_heading is actally a part of http://riehl.cylog.de/?Heading:Another_ ... H4_heading - if it was named Heading:Another_H2_Heading:An_H3_heading1 it wouldn't be.

I guess it is fixed with:

if (@substr($u[$s], 0, 1+strlen($u[$ta[$i]])) == $u[$ta[$i]].$cf['uri']['seperator'])$t .= 's';


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 09, 2007 1:32 pm 
Offline

Joined: Tue Sep 14, 2004 5:21 pm
Posts: 1210
Location: Germany: Unterfranken
Yes Peter,

you are right, it fixed it. I have exchanged the line in the online example to show the result.

However, I think it was a weird combination of unnecessary circumstances anyway - nobody else but me would use such a stupid menu for testing :wink: .

Thanks

Till


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: MSN [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group