[NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted
Posted: Fri Sep 01, 2006 12:43 am
"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
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