Bug in Menumanager plugin

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Bug in Menumanager plugin

Post by Holger » Wed Oct 15, 2008 6:33 am

In my content.htm is a upper- and lowercase mix of <hx>-tags so the page will not validate XHTML.
I've found that these mixed <Hx></hx> tags caused by a bug in the Menumanager plugin.
It happens when you drag'n drop a page to another menulevel.
For now only tested with Menumanager 2007 - (Club-)Version and latest Firefox 2 on WAMPP.

Can someone confirm that or, much better ;) , can someone fix that?

Holger

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: Bug in Menumanager plugin

Post by Till » Wed Oct 15, 2008 8:25 am

Holger wrote:can someone fix that?
In admin.php search for:

Code: Select all

$leveledPage = preg_replace('/<H[1-3]/i','<H'.$pageInfo[1] , $c[$pageInfo[0]],1);
$leveledPage = preg_replace('/H[1-3]>/i','H'.$pageInfo[1].'>' , $leveledPage,1);
Change the capital H to small h letters. Then it is fixed.

But I found another cute bug. After moving a menulevel3 item to menulevel2 I received this HTML code:

Code: Select all

<h2>An H3 heading</h3>
I bet this wont validate either ;)

Till

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: Bug in Menumanager plugin

Post by Holger » Wed Oct 15, 2008 9:45 am

Till wrote: In admin.php search for:

Code: Select all

$leveledPage = preg_replace('/<H[1-3]/i','<H'.$pageInfo[1] , $c[$pageInfo[0]],1);
$leveledPage = preg_replace('/H[1-3]>/i','H'.$pageInfo[1].'>' , $leveledPage,1);
Change the capital H to small h letters. Then it is fixed.
Amazing, I've looked into all files except admin.php :roll: :oops: .

Thanks for your help!

Holger

Edit:
Now I've tested with version 2007a, that's the lates version without integrated renaming of headings.
It seems that there's no issue like described above.

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: Bug in Menumanager plugin

Post by Till » Wed Oct 15, 2008 10:14 am

Till wrote:But I found another cute bug. After moving a menulevel3 item to menulevel2 I received this HTML code:

Code: Select all

<h2>An H3 heading</h3>
I bet this wont validate either ;)
Yes, this bug appears in menumanager 2007b. But to fix it you change:

Code: Select all

$leveledPage = preg_replace('/h[1-3]>/i','h'.$pageInfo[1].'>' , $leveledPage,1);

to

Code: Select all

$leveledPage = preg_replace('/h[1-3]>/i','h'.$pageInfo[1].'>' , $leveledPage);
You just remove the number "1" at the end of the line.

Till

soong
Posts: 14
Joined: Sat Sep 06, 2008 11:21 am
Location: Rheinland-Pfalz, Germany

Re: Bug in Menumanager plugin

Post by soong » Wed Oct 15, 2008 2:39 pm

I was unsure if the first bug also affects versions lower than 2007b. So I checked the admin.php of Menumanager 2006c - there are no capital 'H'-tags in it. Just for others to know ;)

2006c is the last free version of Menu Manager, right?

CMSimple-Styles.com
Posts: 342
Joined: Thu Jun 26, 2008 8:19 pm
Location: Germany
Contact:

Re: Bug in Menumanager plugin

Post by CMSimple-Styles.com » Thu Nov 13, 2008 1:41 am

The new version (2008a) is now online for free! I hope i have fixed all known bugs, but if new ones are found i will quickly create a version 2008b to deal with them. Please test this version and report any bugs you can find, It now also supports up to 6 menulevels when set in CMSimple.

Post Reply