Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #N
Problem/Motivation
Because modern local actions are keyed by route name and legacy are keyed by path, both are added.
Proposed resolution
When possible, key legacy local actions by route name, and ensure that modern ones take precedence
Remaining tasks
Does this need tests if we're about to remove all legacy local actions within the next several weeks?
User interface changes
Fix visual bug
API changes
N/A
Related Issues
N/A
Comment | File | Size | Author |
---|---|---|---|
#5 | local-actions-2105167-5.patch | 2.05 KB | tim.plunkett |
#5 | interdiff.txt | 900 bytes | tim.plunkett |
#1 | local-actions-2105167-1.patch | 1.17 KB | tim.plunkett |
#1 | Screen Shot 2013-10-04 at 2.09.56 PM.png | 17.94 KB | tim.plunkett |
#1 | Screen Shot 2013-10-04 at 2.10.06 PM.png | 18 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettBefore:
After:
Comment #2
pwolanin CreditAttribution: pwolanin commentedThis looks reasonable to me. Initially we keyed the plug local actions by path which prevented this problem, but later we switched to route name.
By putting anything from hook_menu also by route it's the correct fix.
Comment #3
nod_tested and fixed my problem. If pwolanin is ok with it, RTBC then :)
Comment #5
tim.plunkettTwo local actions are in a different order now:
When two hook_menu-based local actions have the same weight, they were previously ordered by href, now they are ordered by route name.
That's why these switched (d < h, 2 < 4).
Yay for test coverage!
Comment #6
pwolanin CreditAttribution: pwolanin commentedComment #7
catchCommitted/pushed to 8.x, thanks!