[NOT A BUG] Ghost Menu Items in database

Confirmed bugs that have been Fixed - Joomla 1.0.x



[New Threads cannot be started in this forum]
Locked
K123
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Jun 08, 2007 5:10 am

[NOT A BUG] Ghost Menu Items in database

Post by K123 » Thu Jun 21, 2007 4:13 am

Start here[iurl=http://forum.joomla.org/index.php/topic ... #msg872525] third post[/iurl]

Duplicating this bug:
1 start creating a new component menu item: Menu Manager > mainmenu > new > component
2 Give it a name, component and set as published
3 Click apply
4 Clear the name field (possibly also set a unpublished)
5 Click cancel

Now you have a Menu Item that only exists from the front end not in the back (so you cannot delete it!). Trash IS empty.

Having successfully repeated this 3 times with no solution I have decided I better not continue until I can fix the problem. I hope I don't have to clear these manually from the database.

Quick Disclaimer: I couldn't find anything related in this forum but this may not be new. Secondly I may be wrong here as I haven't fully explored the problem (don't want to make it worse), if I am I'll come back and edit this post (here's hoping)

>> Oh and if this is still here in a couple of days i'll redo it to match the template.
Last edited by K123 on Fri Jun 22, 2007 5:14 am, edited 1 time in total.

K123
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Jun 08, 2007 5:10 am

Re: [BUG] Ghost Menu Items in database INCLUDING PUBLISHED ITEMS!

Post by K123 » Thu Jun 21, 2007 10:52 pm

Effectively reopening this bug
[NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted
http://forum.joomla.org/index.php/topic,90991.0.html


"Menu Items not removed from jos_menu when deleted from site administration"

We recently updated to Joomla 1.0.11 and when we did, we noticed a big problem.

After upgrading to 1.0.11 and installing on the server we noticed that Open Sef was not correctly sef'ing the URLs for the Hot Properties component.  We dug through all the code involved in hot properties and open sef but to no avail.

We then started digging through the database.  One thing we did know is that Open Sef relies on a menu item linking to a component to let you set a SEF Alias.  Based on this knowledge we looked in jos_menu to see if for some reason there was a problem with the record holding the menu item that linked to Hot Properties.  While looking in that table, we saw that there were old menu items linking to hot properties even though we had deleted those menu items in the admin panel.


OK So after saying all that... here is whats up.  When you create a menu item, and then delete it, Joomla is not removing the reference from the database.  So if you are like us and change your menu a few times before you get it right you end up with a bunch of "ghost" entries in your jos_menu table that should not be there.  This was confusing open sef and essentially causing it to not work with any of the components that were linked to by these "Ghost" entries.

After removing all entries pointing to com_hotproperty we performed a very simple test.

1.  Delete all entries in jos_menu using the mysql client or phpmyadmin that point to a certain component.
2.  Create two new entries using the Joomla Administration web interface.
3.  Go look in your jos_menu table again and you will see the two entries.
4.  Delete one of your menu items using the Joomla Administration web interface.
5.  Look in the jos_menu table using mysql client or phpmyadmin and you will notice that both entries still exist.

This may not cause a problem with Joomla but it is definitely not good to leave the ghost entries in the jos_menu table because many components rely on that table to find active components.

I hope this can be resolved.  If I get some time I will find the error in the code and fix it and will definitely share it with everyone.  I just figured I would explain what happened because it was a very aggravating problem and if anyone else runs into it hopefully they will find this thread.

BUG:  Joomla Administration interface not removing Menu Items from jos_menu when the Menu Item is deleted.


blindMoe

K123
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Fri Jun 08, 2007 5:10 am

Re: [BUG] Ghost Menu Items in database INCLUDING PUBLISHED ITEMS!

Post by K123 » Thu Jun 21, 2007 11:12 pm

Resolved. Issue unique to my setup. Messed with something I shouldn't have.
Last edited by K123 on Fri Jun 22, 2007 5:13 am, edited 1 time in total.

User avatar
Robin
Joomla! Master
Joomla! Master
Posts: 15753
Joined: Thu Aug 18, 2005 10:41 am

Re: [NOT A BUG] Ghost Menu Items in database

Post by Robin » Sat Jan 26, 2008 9:04 pm

Moving to resolved


Locked

Return to “Q&T 1.0.x Resolved”