Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 12:21 pm (All times are UTC )

 




Post new topic Reply to topic  [ 15 posts ] 
Author Message
Posted: Fri Sep 01, 2006 12:43 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu May 18, 2006 11:31 pm
Posts: 10
"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.

Top
  E-mail  
 
Posted: Fri Sep 01, 2006 10:18 am 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15089
[TAGGED: Q&T] Status > Under Review

_________________
Regards Robin


Top
   
 
Posted: Thu Oct 12, 2006 3:32 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Thu Jul 13, 2006 7:21 pm
Posts: 47
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?


Top
  E-mail  
 
Posted: Tue Oct 24, 2006 12:52 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15089
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?

_________________
Regards Robin


Top
   
 
Posted: Sat Oct 28, 2006 10:00 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1318
Location: New Orleans, LA, USA
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


Top
  E-mail  
 
Posted: Tue Nov 14, 2006 2:53 pm 
User avatar
Joomla! Master
Joomla! Master
Offline

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15089
Q&T Note; no response from poster, and RobS already marked this as not bug. Moving to Resolved.

_________________
Regards Robin


Top
   
 
Posted: Wed Mar 21, 2007 12:26 am 
Joomla! Fledgling
Joomla! Fledgling
Offline

Joined: Wed Nov 22, 2006 8:44 pm
Posts: 4
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.


Top
   
 
Posted: Wed Mar 28, 2007 5:42 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Wed Mar 28, 2007 5:35 am
Posts: 20
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


Top
  E-mail  
 
Posted: Thu Jun 21, 2007 11:30 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Jun 08, 2007 5:10 am
Posts: 14
I reopened this bug after having this issue with items that are still published
http://forum.joomla.org/index.php/topic ... #msg871073


Top
  E-mail  
 
Posted: Sat Aug 04, 2007 9:52 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Aug 03, 2007 12:32 pm
Posts: 5
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?


Top
  E-mail  
 
Posted: Sat Aug 04, 2007 7:04 pm 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1318
Location: New Orleans, LA, USA
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


Top
  E-mail  
 
Posted: Sun Aug 05, 2007 8:45 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Aug 03, 2007 12:32 pm
Posts: 5
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?


Top
  E-mail  
 
Posted: Sun Aug 05, 2007 9:14 am 
User avatar
Joomla! Ace
Joomla! Ace
Offline

Joined: Mon Dec 05, 2005 10:17 am
Posts: 1318
Location: New Orleans, LA, USA
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


Top
  E-mail  
 
Posted: Mon Oct 01, 2007 5:00 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Jan 05, 2007 7:46 pm
Posts: 119
Location: Toronto
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


Top
   
 
Posted: Mon Oct 15, 2007 10:09 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Mon Feb 20, 2006 10:30 pm
Posts: 13
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.

Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 1 guest


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

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