Breadcrumb Trail May Contain Erroneous Entries
michaek - April 6, 2009 - 22:25
| Project: | Menu Trails |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Because _menutrails_recurse_crumbs() modifies $above within the foreach loop, it can lead to displaying erroneous items as ancestors of the current page in the breadcrumb trail. It's easy to fix this by passing a modified $above array to the recursive call, without modifying the value of $above within the loop. See attached diff (against current 6.x-1.x-dev).
| Attachment | Size |
|---|---|
| 1_fix_recurse_above_conflict.diff | 468 bytes |

#1
#2
Updated patch. In previous version, when $above is empty, "$above + $menu_item" replaces $above with $menu_item.
#3
I can confirm that this is a problem, and that this patch does correct it. Thanks, michaek!
#4
I fell foul of this bug and I can confirm that this patch solved it for me. To elaborate on the problem, suppose I have a menu as follows:
When navigating to Fig, the crumb is displayed as Banana -> Fig, instead of just Fig.
#5
Thanks for reporting, reviewing, and testing! Committed to 6.x.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.
#7
sun,
This seems to be a pretty big bug that is annoying a lot of people. I would think it might be helpful to put out a new release of Menu Trails. Is that possible? Is there a plan to put out a new release?
Thanks,
Dan