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.
I've been seeing breadcrumbs breaking due to the system being unable to figure out what the active menus are on dynamic paths.
IMO we should try a bit harder to determine the active menu.
Comment | File | Size | Author |
---|---|---|---|
#1 | breadcrumb_dynamic_path_2.patch | 1.47 KB | bdragon |
breadcrumb_dynamic_path.patch | 1.03 KB | bdragon | |
Comments
Comment #1
bdragon CreditAttribution: bdragon commentedchx pointed out in IRC that we didn't need the query builder in the first place.
Also, I'm more sure of myself this time around. Let's see what the tests say.
Comment #2
carlos8f CreditAttribution: carlos8f commentedCan you point out the pages that are broken? Let's write some tests.
Comment #3
chx CreditAttribution: chx commentedI would think this is a duplicate of #520106: Allow setting the active menu trail for dynamically-generated menu paths.
Comment #4
bdragon CreditAttribution: bdragon commentedSorry about that, had a power outage for something like an hour right as I was finishing up typing this, and had to shut down my network completely because I didn't have the battery power to keep it up for that long.
--
Anything that has a wildcard in the path that doesn't have a seperate menu_link for the exact path being requested was resetting the breadcrumb to "Home" due to not being able to find the active menu.
For example, listing terms in a vocabulary. (admin/structure/taxonomy/1 after creating a vocabulary)
Before patch:
After patch:
Comment #5
bdragon CreditAttribution: bdragon commentedWriting tests now.
Comment #6
Nick Lewis CreditAttribution: Nick Lewis commentedThis is actually a dup of #576290: Breadcrumbs don't work for dynamic paths & local tasks which solves this issue along with a whole slew of other ones.