Closed (duplicate)
Project:
Drupal core
Version:
7.0
Component:
menu system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Jan 2011 at 21:01 UTC
Updated:
23 Jan 2011 at 22:37 UTC
If I edit any page on my site that is in the primary menu and then save it. That menu item disappears from the menu.
The site was recently upgraded from Drupal 6.
Drupal 7.0
Modules installed: Webform, Devel
Comments
Comment #1
montesq commentedI don't reproduce that issue.
Could you give more details to reproduce? Do you have any screenshots to illustrate?
Comment #2
droplet commentedComment #3
fredrik.th commentedI've done som debugging and have found at that it's the menu_node_save()-function that calls the menu_link_delete (line 500 in menu.module). It get's called because $link['enabled'] is empty. $link is set to &$node->menu.
Snippet from function menu_node_save:
Here is a var_dump of $node->menu:
What is $link['enabled'] on how come it's not set?
Comment #4
Jej commentedI have the same problem (migrated from D6 to D7-rc1). I can give more information if needed, just tell me what to dump.
Comment #5
A Drunken Theory commentedI have the same issue. D7. I have no custom modules installed.
I manually created a menu, named Top Menu which controls the links at the top of my site. I added all the links to that menu, but when I go back and edit one of the pages that menu links to, the menu link disappears.
For example.
I have a menu link named How-To-Play, which obviously links to the page How-To-Play. When I edit the How-To-Play page, the menu link disappears and I have to go back into the menu and re-add the link for it to appear.
Not a huge issue, but it's there and I can reproduce it. The issue for me doesn't happen with any of the automatically created menus, just my manually created ones.
I should also mention that "Top Menu" does not show up on the menu drop down selection when editing the page, the only menus that show up for me are the ones that were created by Drupal.
Comment #6
montesq commented@A Drunken Theory:
1° How do you add the page in the menu? Do you use the "menu settings" in the vertical menu when you edit the node or do you go in admin/structure/menu/Top menu + "add link"
2° Do you edit the node with the admin user? If not, can you try to reproduce with the admin user?
Comment #7
A Drunken Theory commented@montesq
I add the menu link via the admin panel (/admin/structure/menu/manage/menu-top-menu/add). I'm editing the node and the menus with the admin user.
Comment #8
A Drunken Theory commentedYeah, none of the other menus are showing up when I edit the node. The only one that shows up is MAIN MENU. I have several custom created menus, but that is the only one that appears in the Parent Item drop down menu. That explains why it disappears from the proper menu when the node gets edited.
Am I doing something wrong to not have all the menus as an option in the Parent Item drop down?
Comment #9
Jej commented@montesq: I think fredrik.th was on the good way. I commented out the menu_link_delete() and I am not annoyed anymore (I don't mind the side effect for now, I hope this issue will be solved!). The menu_link_delete call is wrong, the link should not be deleted here.
Comment #10
montesq commentedI think this one is duplicate of #957784: Saving node_form removes any menu items that are not in one of the Available menus
Please re-open if it isn't