Any menu link that uses the internal: URL scheme, including views, links to , and /contact, will be force-reset to the top level of its menu on cache rebuild.
Steps to reproduce:
1. Create a custom menu.
2. Create a node (or use an existing node).
3. Create a menu link, title "Parent", that points to the node from #2.
4. Create a menu link, title "Child", with parent "Parent", linked to '/contact'.
5. Confirm that Child is the child of Parent.
6. Rebuild the cache.
7. Edit your custom menu.
8. Observe that Child is now at the top level, next to Parent.
Furthermore, if you edit "Child," it still has its parent set to "Parent". If you save "Child", it will be a child of "Parent" again, until the next cache rebuild.
Screenshot - view setting specifying parent menu item:
Screenshot - main menu tree displaying all menu items at the same (top) level:
It doesn't matter what the parent menu item is. This occurs regardless of the parent item's depth -- i.e. if the parent is 3 levels deep, the view's menu item will still end up at the top level.
If you then edit the menu item directly, change nothing, and save it, it will then acquire the correct parent.
For menu links from views, the issue is compounded by the fact that views rebuilds the menus anytime any view is saved (see) so it means you're often "fixing" the menus.
This may be related toalthough that appears to have been fixed some time ago.
Add checks for internal/custom menu links prior to force-reset of menu items to the top.
User interface changes
Beta phase evaluation
|Issue category||Bug because of the way it garbles your menus.|
|Issue priority||Critical because it results in data loss.|
|Prioritized changes||The main goal of this issue is developer/site editor usability.|
Steps to reproduce:
- Standard install.
- Create two pages and place them both in the main menu at the top level.
- Create a view with a page. Add a menu link to the view's page display, setting the parent item to the first node's menu item.
- Visit admin/structure/menu/manage/main to see the menu tree.
Expected result: The two node menu items are at the top level, with the view menu item underneath of (a secondary menu item for) the first node menu item.
Actual result: All three menu items are at the top level.
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 110,461 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 110,422 pass(es). View
PASSED: [[SimpleTest]]: [PHP 5.5 MySQL] 108,220 pass(es). View