Download & Extend

Adding new node link with the same path will hide other links to the same node

Project:Drupal core
Version:6.x-dev
Component:menu system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

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

#2

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

#3

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.

#4

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
multi-node-links-179578-4.patch1.21 KBIgnored: Check issue status.NoneNone

#5

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

#6

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.

#7

Patch works for me, too.

#8

Status:reviewed & tested by the community» fixed

Thanks, committed.

#9

Status:fixed» closed (fixed)