I have installed and enabled taxonomy_breadcrumb, and set path on /admin/content/taxonomy/edit/vocabulary/6
Now i see breadcrumbs "alphabetical > B" etc. on node pages. But on terms pages i see only home link.
And i have no views module enabled.

CommentFileSizeAuthor
#2 taxonomy_breadcrumb.zip11.31 KBfasdalf@fasdalf.ru

Comments

fasdalf@fasdalf.ru’s picture

Looks like function taxonomy_breadcrumb_term_page($str_tids = '', $depth = 0, $op = 'page') wasn't called even once. I added die('hello') in the beginning and it wasn't called.
Weight of both taxonomy and taxo-breadcrumb are 0 by default. I tryed -5 fnd 5 for taxonomy breadcrumb (with re-enabking module in admin/build/modules) and nothing changed.

fasdalf@fasdalf.ru’s picture

StatusFileSize
new11.31 KB

To make it work i changed callback registration to

  // Similiar to core menu item in taxonomy_menu, except callback is different
  $items['taxonomy/term/%'] = array(#change
    'title' => 'Taxonomy term',
    'page callback' => 'taxonomy_breadcrumb_term_page',
    'page arguments' => array(2),#add
    'access callback' => 'user_access',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
  );

and callback itself to

function taxonomy_breadcrumb_term_page($str_tids = '', $depth = 0, $op = 'page') {
  // load module #add
  include_once drupal_get_path('module','taxonomy').'/taxonomy.pages.inc'; #add
  // Call the core taxonomy_term_page function
  $output = taxonomy_term_page($str_tids, $depth, $op);

  // Use first term to generate breadcrumb trail
  $terms = taxonomy_terms_parse_string($str_tids); 
  $breadcrumb = taxonomy_breadcrumb_generate_breadcrumb($terms['tids'][0], TRUE);
  drupal_set_breadcrumb($breadcrumb);

  return $output;
  
}

Also i changed .install to set higher weight on install. Appendix in mysql section is:

      db_query("CREATE TABLE {taxonomy_breadcrumb_term} (
                tid int(10) unsigned NOT NULL default '0',
                path varchar(128) NOT NULL default '',
                PRIMARY KEY (tid)
                ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
# starts here
      // set the weight to override taxonomy behavior
      $taxomnomy_breadcrumb_weight = db_result(db_query("SELECT weight 
                FROM {system} WHERE name = 'taxonomy'"))+10;
      db_query("UPDATE {system} SET weight = %s 
                WHERE name = 'taxonomy_breadcrumb'",$taxomnomy_breadcrumb_weight) ;
      unset($taxomnomy_breadcrumb_weight);
# ends here
      break;

Zip-packed result included.

fasdalf@fasdalf.ru’s picture

Status: Active » Needs work

Changing status

MGN’s picture

Status: Needs work » Closed (duplicate)

Looks like you are re-writing patches that were submitted last month. I would recommend starting with
http://drupal.org/node/222636#comment-1075769 and other progress that has been made on that thread.

Sorry. Looks like no one is maintaining taxonomy breadcrumb anymore - There really should be a 6.x branch so we can avoid fixing the same problems again and again.

I hope this helps.

Marking this as a duplicate of #222636: Port Taxonomy Breadcrumb to Drupal 6.x