Drupal menu nesting problem: I just had a problem with menu nesting while developing a Drupal 6 module, and thought I'd share the problem and solution here.
The problem was that in developing my Drupal module, I was trying to created a nested menu structure, something like this:
- My App - Reminders - Add Reminder
Somewhere in the process of developing my module, this Drupal nested menu got out of sync, and my menus appeared in a flat structure, like this:
- My App - Reminders - Add Reminder
After reading various posts on the internet, it looks like the Drupal menu_links table can get out of sync occasionally, and when I ran a SQL SELECT query on the menu_links table, sure enough, the data didn't look right.
Fixing the Drupal menu nesting problem
Fortunately fixing this Drupal menu nesting problem was much easier than I expected it to be. I just went to Admin > Modules, and disabled my module. When I queried the menu_links table all of my data was gone, so I think re-enabled my module, and all my data was back, with the proper nested menu hierarchy I expected.
To be clear, I didn't have to uninstall my module, I just disabled it, and then re-enabled it.
I hope this tip on this Drupal nested menu problem is helpful, and helps save you some time.