Currently it is not possible to add the 'same link' but with different query parameters on the same level to admin_menu.

For example if you combine this with admin_menu_sources. You can add 2 links in the menu for example
-civicrm/contact/add?reset=1&ct=Individual
-civicrm/contact/add?reset=1&ct=Organisation

If you choose this menu as admin_menu, you only get one of the links. The reason is inside the admin_menu_links_menu($tree) function. (That's why i file this issue here instead of in admin_menu_source).

We use only the href element as key inside the generated tree, if we could use a combination of href and optional query's as identifier this could be possible.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mallezie’s picture

Status: Active » Needs review
FileSize
1.72 KB

This could be a start patch to use the query parameters as well as identifier.

Status: Needs review » Needs work

The last submitted patch, 1: admin-menu-samelink.patch, failed testing.

mallezie’s picture

Status: Needs work » Needs review
FileSize
1.7 KB

You shalle not maually edit patches ;-)

truls1502’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +postponed2w

I am sorry for no reply until now.

There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.

We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.

However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.

So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?

Thank you for understanding! :)

truls1502’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Issue tags: -postponed2w

This issue has been automatically marked as closed because it has not had recent activity after the last post.

However, if you or someone is still facing the same issue as described to the issue, could you please to re-open the issue by changing the status of the issue, and add an explanation with more details which can help us to reproduce your situation.

Again, thank you for your contributions! :)

skylord’s picture

Status: Closed (cannot reproduce) » Needs review
FileSize
1.66 KB

The issue is still present. Just try to add multiple items with same path but different query (i.e. views with different prepopulated exposed filters). Rerolled patch from #1.