Posted by guix on November 4, 2009 at 3:33pm
| Project: | Custom breadcrumbs |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi !
"Use taxonomy breadcrumbs for views" works for views taking only a TID argument : my_view/123 gets the correct breadcrumb Home > Term123
But for views that have another argument, like node_type, the breadcrumb stays only Home : my_other_view/123/story gets Home
Can someone reproduce this ?
Using "Use the taxonomy of nodes returned by a view to create the taxonomy breadcrumb" is not an option for me for some reasons...
Comments
#1
Found that in custom_breadcrumbs_common.inc line 84, it must be :
$arg = array_shift($viewargs);instead of
$arg = array_pop($viewargs);#2
Here you are nasty bug
#3
Thanks for the patch. Just to make sure I understand correctly, the error is due to the order in which the arguments are processed when multiple arguments are present? In the current code, the last argument is processed first, and the patch corrects this.
This makes sense. I'll give it a try. Thanks again!
#4
Yes, the problem is that in your loop :
foreach ($arguments as $arg_id => $argument) {}
you start with the first argument in $arguments, and that with :
$arg = array_pop($viewargs);you get the last argument in $viewargs, so the arguments from $arguments and from $viewargs are not related.
#5
This module rocks now with that patch, since I have a heavily taxonomy based site, most of the time I don't even have to customize the views breadcrumbs because I'm happy with the behaviour of "Use taxonomy breadcrumbs for views"
#6
Thanks for catching that error. I've commited the fix to 6.x-2.x-dev.
#7
Great, thanks :)
#8
Automatically closed -- issue fixed for 2 weeks with no activity.