[NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Locked
blindMoe
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu May 18, 2006 11:31 pm

[NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by blindMoe » 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
Last edited by RobS on Sat Oct 28, 2006 10:01 pm, edited 1 time in total.

user deleted

Re: !!! Menu Items not removed from jos_menu when deleted from site administrati

Post by user deleted » Fri Sep 01, 2006 10:18 am

[TAGGED: Q&T] Status > Under Review

wmena
Joomla! Intern
Joomla! Intern
Posts: 84
Joined: Thu Jul 13, 2006 7:21 pm

Re: [UNDER REVIEW: 1.0.11] Menu Items not removed from jos_menu when deleted

Post by wmena » Thu Oct 12, 2006 3:32 pm

Why would this be a bug? 

When you Delete/Trash a content or menu item, they are moved to trash so that you can recover them if needed later.  You need to clear the trash to fully remove these entries from the database.

When a menu item is Published, the published flag is set to 1
when a menu item is not published, the published flag is set to 0
when a menu item is trashed, the published item is set to -2

Isn't it the responsibility of the 3rd party component to recognize this?

user deleted

Re: [UNDER REVIEW: 1.0.11] Menu Items not removed from jos_menu when deleted

Post by user deleted » Tue Oct 24, 2006 12:52 pm

Q&T Note; wmena is right, menu items can be trashed, but should not be removed directly from the database. I'm also thinking this might be related to Artifact http://forge.joomla.org/sf/go/artf6074?nav=1 which has now been solved for the next release.

@ blindMoe, could you verify that if you use the latest SVN in combination with your site and OpenSEF, that the problem is solved?

User avatar
RobS
Joomla! Ace
Joomla! Ace
Posts: 1366
Joined: Mon Dec 05, 2005 10:17 am
Location: New Orleans, LA, USA
Contact:

Re: [UNDER REVIEW: 1.0.11] Menu Items not removed from jos_menu when deleted

Post by RobS » Sat Oct 28, 2006 10:00 pm

Q&T Note; Changing status> Not Bug
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions

user deleted

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by user deleted » Tue Nov 14, 2006 2:53 pm

Q&T Note; no response from poster, and RobS already marked this as not bug. Moving to Resolved.

sgt_goomba
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Nov 22, 2006 8:44 pm

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by sgt_goomba » Wed Mar 21, 2007 12:26 am

Instead of starting a new topic, I'll raise this one from the dead. I know it was listed as Not Bug, but there was no explanation. The behavior is as described above, but again, menu items aren't removed from the database when they are deleted. They are also nowhere to be found in my "trash bin," which is empty. The entries remain in the database (in the table jos_menu) with a published status of -2.

I don't have a problem with it as long as this is normal behavior.

ouija
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Mar 28, 2007 5:35 am

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by ouija » Wed Mar 28, 2007 5:42 am

I second that -- recently, I was using a 3rd party component and it somehow picked up on these "ghost" entries left behind in the jos_menu table of my DB. (they were set to -2 under published)  But still, these were for menu items that I had deleted and emptied from the trash.... so why do they still exist in the DB?  It just makes things somewhat confusing when modules like the one I was using pick up on these entries and can make it difficult for the end user to determine which ones are "deleted" and which ones are not...

It is simple enough to figure out, as well as to delete these entries manually, but still... why is this not considered to be a bug? Just curious :p

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

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

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

I reopened this bug after having this issue with items that are still published
http://forum.joomla.org/index.php/topic ... #msg871073

christiangibson
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 03, 2007 12:32 pm

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by christiangibson » Sat Aug 04, 2007 9:52 am

I have trashed two menu items, but trash manager shows an empty trash bin. The items are still in jos_menu table with 'published' status set to -2. This would be okay if I could expunge the items from trash bin, but this is not possible. This is surely a bug?

User avatar
RobS
Joomla! Ace
Joomla! Ace
Posts: 1366
Joined: Mon Dec 05, 2005 10:17 am
Location: New Orleans, LA, USA
Contact:

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by RobS » Sat Aug 04, 2007 7:04 pm

Are you selecting menu items in the type box of the trash manager? The default view is to show content items only.  You need to click the drop down on the right and select menu items for it to show you menu items.  Also, which version of Joomla! are you using?
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions

christiangibson
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Aug 03, 2007 12:32 pm

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by christiangibson » Sun Aug 05, 2007 8:45 am

Sorry for my oversight! Of course you are right - I recently discovered my mistake. But would it not be more logical to show all items in the trash bin as default rather than just the content items?

User avatar
RobS
Joomla! Ace
Joomla! Ace
Posts: 1366
Joined: Mon Dec 05, 2005 10:17 am
Location: New Orleans, LA, USA
Contact:

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by RobS » Sun Aug 05, 2007 9:14 am

Yes, it probably would be more logical but this is not something that we are going to change at this point, sorry.
Rob Schley - Open Source Matters
Webimagery - http://www.webimagery.net/ - Professional Consulting Services
JXtended - http://www.jxtended.com/ - Free and Commercial Joomla! Extensions

User avatar
jsw
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 175
Joined: Fri Jan 05, 2007 7:46 pm
Location: Toronto

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by jsw » Mon Oct 01, 2007 5:00 pm

Can jos_menu items that display as having been trashed ( -2 in the Published column ) still be visible on the front end? I have been trying to clean up our database and delete all '-2' items, yet in some cases these delete existing (presently being used and published) menu items. Can you explain this?

jsw

Aquabri
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Mon Feb 20, 2006 10:30 pm

Re: [NOT BUG:1.0.11] Menu Items not removed from jos_menu when deleted

Post by Aquabri » Mon Oct 15, 2007 10:09 pm

Same issue, have trashed and emptied trash for content and menu items and th ghost entries are still appearing.

FIXED:  it was an issue on SWMENUfree automatically publishing content items as menu items
Last edited by Aquabri on Mon Oct 15, 2007 10:18 pm, edited 1 time in total.


Locked

Return to “Q&T 1.0.x Resolved - Archived”