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...

CommentFileSizeAuthor
#2 custom_breadcrumbs-623274-2.patch1021 bytesguillaumeduveau

Comments

guillaumeduveau’s picture

Category: support » bug

Found that in custom_breadcrumbs_common.inc line 84, it must be :

      $arg = array_shift($viewargs);

instead of

      $arg = array_pop($viewargs);
guillaumeduveau’s picture

StatusFileSize
new1021 bytes

Here you are nasty bug

MGN’s picture

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!

guillaumeduveau’s picture

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.

guillaumeduveau’s picture

Version: 6.x-2.0-beta1 » 6.x-2.x-dev
Status: Active » Needs review

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"

MGN’s picture

Status: Needs review » Fixed

Thanks for catching that error. I've commited the fix to 6.x-2.x-dev.

guillaumeduveau’s picture

Great, thanks :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.