Can't delete "Stray Menu Items" after deleting taxonomy vocabulary
| Project: | Taxonomy Menu |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Issue:
-Deleting a vocabulary and its terms leaves stray menu items that cannot be deleted.
-Stray menu items after vocabulary deletion
-Taxonomy menu item deletion sequence if not followed correctly leaves stray menu items.
Setup:
From within the taxonomy module:
1.- Create a vocabulary named "Test" using taxonomy.
2.- Assign the vocabulary to a menu (ie., Secondary links)
Now the vocabulary appears on the secondary links and also in the menu module administration.
the secondary link list shows the taxonomy menu items without the delete option as expected.
3.- go back to the taxonomy module and delete the vocabulary "Test"
The vocabulary is deleted from the taxonomy vocabulary list as expected.
4.- The "Secondary Links" menu now has stray items that cannot be deleted unless removed from the database table itself.
Additional note:
The only way to properly remove the links from a taxonomy menu is follow this sequence:
1.- disable the "taxonomy menu" option from within the vocabulary edit mode.
2.- Save these options.
3.- Go to the taxonomy vocabulary list and then delete the vocabulary.
The issue here is that if you forget to do these three steps you may end up with several stray links. Furthermore, these links can only be deleted via direct manipulation to the database table and not from the Drupal administrative UI.
Thanks for your prompt attention. If you need additional information just send me a note.
Sandro

#1
Thanks Sandro. We'll take a look.
Side Note: If you wish to remove all menu links created by Taxonomy Menu, you can uninstall the module.
#2
Hi and thanks for the reply.
I tried to remove the menu links by uninstalling the module but the menu items remained strayed. However, I don't remember if I cleared the cache or not. If am not mistaken, the menu links remain if the vocabulary taxonomy menu option is not disabled before deleting the whole vocabulary. After that you end up with stray items.
Oh yes I remember now.... if you disable the taxomony menu module as you suggested, the stray links go away from the Adminstration UI. However if you go and look at the database table you will see the stray data there. Once the taxonomy menu module is activated again the strays reappear.
This is an issue because you may have more than one taxonomy menu. Disabling the module is not the best approach if you want to keep one of the taxonomy menus.
Another issue is the fact that the database starts to collect stray data.
Let me know if I can be of assistance.
Best regards,
Sandro
#3
I'm having exactly this problem. In my case I'm testing site structure with Devel so the problem is exacerbated quickly.
I've tried the uninstall technique above and also found that the database continues to store the stray data.I'm using Devel Generate and Taxonomy Menu to create dropdown primary links for testing purposes (in preparation for a complex taxonomy structure). When I change the taxonomy content that originally built the menus and tell Devel to delete any previous nodes, the content is deleted but the primary menus remain with no data.
There's also no way to delete the taxonomy-generated menu items, unlike the ones created by hand. A mass delete function for menus items would be ideal, and I'm feeling silly for not finding one.One unsuccessful workaround was to move all stray or null menus under one real menu item, then to migrate it to a secondary link while checking "Select to rebuild the menu on submit." That breaks apart the null menu items from the functional one (so it recognizes the real node and moves it properly)
, but I'm still left with the stray primary menu items that can't be deleted.CORRECTION:
Apologies. I've discovered that using the uninstall function in the Plugin Manager does not remove the stray items as stated, but using the built-in uninstall function on the module page does in fact clear them!
I would still like to find a quick and clean way of deleting these stray items, and some kind of check box for individual items would be ideal.
Thanks for any help with this!
#4
Great, I'm glad you figured some stuff out.
If you selected the rebuild option, then it deletes all of the current menu items created for taxonomy menu and that vocab, then recreates them.
You are correct in the statement that it didn't used to delete the menu items. That has been correct. #472004: Erros on term deletion and http://drupal.org/cvs?commit=218914
#5
How do you get to the built-in uninstall option?
#6
oops, sorry about status change.
Again, I can't figure out how to access the module's built-in uninstall function.
#7
The uninstall is not part of taxonomy menu but part of drupal. You should also uninstall modules if you are done with them.
Go to: admin/build/modules/uninstall
#8
I believe that I've run across this issue, but in may case I only want the taxonomy menu to keep pace with the vocabulary itself as terms are deleted.
i.e. if a term is deleted from the vocabulary, should I expect the menu item to be deleted at the same time?
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
I am having this same problem and am unsure of what exactly need to be done to fix. I had taxonomy terms with Primary link menu affiliations. I deleted the tax terms and now cannot get rid of the menu terms. I have disabled and uninstalled the tax term module and yes the menu items do go away, but when i re-install the terms come back. I cannot seem to find what table needs to be cleared to start from scratch.
Any help would be great,
Dave