When using crumbs.path plugin for path having alias like "a/b/c" breadcrumb looks like "Home>c".
The problem that crumbs module tries to load parent path menu item for "a/b" using menu_get_item() function and fails as it works with interal drupal paths only, not aliased. Module counts "a/b" path as non-existing and stops building breadcrumbs.
I propose to modify crumbs.path plugin to return internal parent path.

class path_class_CrumbsParentFinder {
  
  function getRuleTitle() {
    return 'existing alias for the given path';
  }
  
  function find($path) {
    $alias = drupal_get_path_alias($path);
    $fragments = explode('/', $alias);
    if (count($fragments) > 1) {
      array_pop($fragments);
      return drupal_get_normal_path(implode('/', $fragments));
    }
  }
}

Comments

donquixote’s picture

Looks reasonable.
The other option would be to always call drupal_get_normal_path on any path returned from the find() hook.

I think I even ran into this same issue myself, and fixed it on a local version, but not in a way that I want to commit it. Probably in the following weeks I will have time to make a new -unstable release. No access to code atm.
I wonder if I can make unstables with two-digit version numbers :)

Until then I think your patch/fix is a good solution.

donquixote’s picture

Fixed in -dev (wait for packaging script).

donquixote’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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