Nasty menus!
1. I enabled by accident the 'Menu items within this container' in 'Category menu items' collapsible menu.
2. Menu and submenu items were created properly in my primary links (as i setted by default in Menu item settings on /admin/settings/category)
3. I then tryed to remedy to my mistake disabling the menu items, but the damage is done and the previously created menu and submenu items remain where they are and do not get deleted >:\
4. I then tryed checking the 'delete this menu item' in the Drupal default 'Menu settings' collapsible menu (the one below Authoring information and Publishing settings)
Final result: the main menu item (in my case 'Countries') was deleted, but all the submenu items were transferred to the main menu...yeek!! To get rid of them i should delete them one by one from /admin/menu. Still unfortunately my 'Countries' container contained 222 categories (!) so i guess i will reload the most recent database dump.
Also i think is not too clear who does what between Drupal 'Menu settings' on-the-fly, and /admin/menu settings...but this is another story ;)
Thank you very much,
Marco
Comments
Comment #1
Jaza commentedI consider this to be more of a new task/feature than a bug. I do think that this functionality needs to be added to category_menu - however, the trick will be working out when a container's menu settings changed from 'enabled' to 'disabled', and ONLY performing a mass delete of menu items when that happens. We don't want all menu items getting deleted, if a container doesn't use category_menu at all, and has a whole heap of custom menu items that have been carefully crafted!
Comment #2
JirkaRybka commentedThis sort of problems was indeed a bit nasty back on 4.7.x and 5.x. But now, after another 3 years (with this issue being silent all that time), with the 6.x version in rc1 stage, we're in a bit different situation.
- Internally, category_menu generated items are now different from custom entries.
- When changing the menu-related settings on a container, all the child items are NOT updated or deleted immediately, but a warning is shown, with a suggestion how to apply the change properly (in the case that it's intended as permanent, as opposed to just intermediate state in larger tuning of the config)
- The full update of all the menu items is now supported by category_resave sub-module, without need to do each item manually.
- The "Menu settings" on-the-fly (on node forms) was indeed a bit incompatible, and is now removed from these forms by category_menu to avoid confusion
- Also the menu administration screen is now changed, so that it doesn't offer incompatible options that won't save permanently
- The syndrome of scattering children of a deleted menu link onto top level of a menu (which is actually caused by core menu system) is now fixed by a guard code inside category_menu
- The mass-deletion operation, apart from being possible through category_resave mass-update, now occurs if un-installing category_menu module.
This all applies to 6.x version, where most of these fixes came in #481280: Generated menu items vs. menu administration and weights, so I consider this 'fixed' for 6.x, or perhaps 'duplicate' of that other issue (having the actual fix). Moving away from 4.7.x (or 5.x), as these versions are not supported anymore.