Dashboard - Custom canonical links get overwritten

Created on 9 July 2025, 2 days ago

Allow custom node URLs in Commerce dashboard links.

Steps to reproduce:

1. Add at least 2 menu items to the Commerce admin menu linking to nodes.
2. Navigate to the commerce dashboard
3. Observe at least one is missing.

Looking at the getManagementLinks() function in DashboardController.php, the key is altered with Html::cleanCssIdentifier($link->getRouteName()...however, for a node page, this equates to entity-node-canonical which gets overwritten with the 2nd entity-node-canonical entry.

This might be a small use case however, to resolve I just added an index to track in the foreach loop and added an isset check on $links[$key] - if it exists, I append -<index> making it unique and correcting the issue.

I have added the patch of a fix that works for my project but please feel free to correct how you see fit, if you see it as a problem.

If a fix is not deemed required, I would suggest a little caveat note in documentation.

Thanks!

🐛 Bug report
Status

Active

Version

3.1

Component

Other

Created by

🇨🇦Canada nicole.harnish Halifax

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024