1. Add one Primary menu item named "Link 1" with path "node/1".
2. Add second Primary menu item named "Link 2" with path "node/1".
3. Menu item named "Link 1" is removed and "Link 2" is kept

If i do the same with "" the "Link 1" is not deleted.

CommentFileSizeAuthor
#4 multi-node-links-179578-4.patch1.21 KBpwolanin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

I'll take a look - in D6 you should be able to create multiple links to the same path (if you really want to)

pwolanin’s picture

ok, I can reproduce this with a node link, but menu module will happily add two links to ''

pwolanin’s picture

ah, all the node links are in the DB table, they are just not being displayed for some reason! So the initial description of the bug is wrong - a new link is created with a new mlid, but for some reason only one of the two (or more) links is displayed.

pwolanin’s picture

Status: Active » Needs review
FileSize
1.21 KB

the bug is in function menu_tree_collect_node_links() and function menu_tree_check_access().

patch attached, seems to fix the problem in a reasonable way.

pwolanin’s picture

Title: Adding new menu item with same path will delete other item » Adding new node link with the same path will hide other links to the same node
chx’s picture

Status: Needs review » Reviewed & tested by the community

yes, this works well. we can change the node_links array as we want because it's only used at these two places.

hass’s picture

Patch works for me, too.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)