I ran the coder (code review) module and made a few changes.

The remaining issues are:

taxonomy_breadcrumb.module

      severity: critical Line 138: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
        if ($may_cache) {

      severity: critical Line 139: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
          $items[] = array(

      severity: critical Line 150: The menu system has been completely over-hauled in 6.x. (Drupal Docs)
          $items[] = array('path' => 'taxonomy/term',

taxonomy_breadcrumb.install

      severity: critical click to read more Line 15: A new schema API has been added in 6.x (Drupal Docs)
        switch ($GLOBALS['db_type']) {

Comments

_craig’s picture

Title: Port to drupal 6.0 » Port to drupal 6.x
Category: bug » task

Thanks for the diff. Just downloaded 6.x...

hillaryneaf’s picture

Is there an ETA for the Drupal 6 release?

_craig’s picture

Please check out the latest 6.x beta.

http://drupal.org/node/61944/release

Plese test it out on your NON-production site and let me know of any issues. There's still some remaining issues I know of that need to be fixed, but give it a shot.
Remaining Issues:

  • Clean up and reorder forms
  • Update install script to support new database API.
brmassa’s picture

Version: 5.x-1.4 » 6.x-0.1-beta
StatusFileSize
new2.47 KB

Guys,

i fixed the entire .install file. changes:
* hook_schema
* delete variables (variable_del) during uninstall
* Doxygen comments

Im also going to work on the .module file today. there are some optimizations to be done.

regards,

massa

brmassa’s picture

Status: Active » Needs review
StatusFileSize
new10.75 KB

Guys,

now i did some work on .module file. what i did:
* Split the functions into 3 files: .module (only containing hooks), .admin.inc (the main admin page) and .inc (all other functions). It will make the site to load and parse the entire module every time, but only when the functionality is needed.
* the taxonomy_breadcrumb_form_alter() was now divided in two: taxonomy_breadcrumb_form_taxonomy_form_term_alter and taxonomy_breadcrumb_form_taxonomy_form_vocabulary_alter(). Its better since Drupal wont need to call out hook_form_alter on every form. PS: this strategy can be used on all hook_form_alter functions.
* all non-hook functions now have a _ at the name. It avoid to be called accidentally by another hook.
* Doxygen comments
* Minor enhancements

However, i didnt changed the module logic at all. every function have the same content.

regards,

massa

_craig’s picture

Great. I'll review this and try to get a release out within the next couple of weeks!

alliax’s picture

It would be nice to have an update anyday, subscribing.

luti’s picture

Vocabulary edit doesn't work if Taxonomy Breadcrumb module is installed (after clicking "edit vocabulary", only a blank page is displayed, without any error being logged...).

After I've disabled this module, vocabulary edit works again...

amats’s picture

+1 with the same result on the Vocab editing.

In my case additional to the blank page I also received an error which follows

Fatal error: Call to undefined function: _taxonomy_breadcrumb_get_vocabulary_path() in /home/echok0/public_html/drupal/sites/all/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.module on line 137

domesticat’s picture

Subscribing. I'm seeing the same error as #9.

psicomante’s picture

subscribing

pillarsdotnet’s picture

StatusFileSize
new25.93 KB

Fixed the vocabulary-edit problem:

diff -urp alpha/taxonomy_breadcrumb/taxonomy_breadcrumb.module alpha-patched/taxonomy_breadcrumb/taxonomy_breadcrumb.module
--- alpha/taxonomy_breadcrumb/taxonomy_breadcrumb.module        2008-04-17 14:47:04.000000000 -0400
+++ alpha-patched/taxonomy_breadcrumb/taxonomy_breadcrumb.module        2008-09-04 13:16:38.000000000 -0400
@@ -130,6 +130,7 @@ function taxonomy_breadcrumb_help($path,
 function taxonomy_breadcrumb_form_taxonomy_form_vocabulary_alter(&$form, &$form_state) {
   // Include the .inc file with all helper functions
   include_once drupal_get_path('module', 'taxonomy_breadcrumb') .'/taxonomy_breadcrumb.admin.inc';
+  include_once drupal_get_path('module', 'taxonomy_breadcrumb') .'/taxonomy_breadcrumb.inc';

   $form['taxonomy_breadcrumb_path'] = array(
     '#type'           => 'textfield',

Also, here's another improvement from http://drupal.org/node/226845

diff -urp alpha/taxonomy_breadcrumb/taxonomy_breadcrumb.inc alpha-patched/taxonomy_breadcrumb/taxonomy_breadcrumb.inc
--- alpha/taxonomy_breadcrumb/taxonomy_breadcrumb.inc   2008-04-17 14:47:13.000000000 -0400
+++ alpha-patched/taxonomy_breadcrumb/taxonomy_breadcrumb.inc   2008-09-04 13:13:37.000000000 -0400
@@ -85,7 +85,7 @@ function _taxonomy_breadcrumb_generate_b
   foreach ($parent_terms as $parent_term) {
     $term_path = _taxonomy_breadcrumb_get_term_path($parent_term->tid);
     if ($term_path == NULL) {
-      $term_path = "taxonomy/term/$parent_term->tid";
+      $term_path = taxonomy_term_path(taxonomy_get_term($parent_term->tid));
     }
     // Do not create links to own self if we are on a taxonomy/term page.
     if ($is_term_page && $parent_term->tid == $tid) {

Patch from the http://ftp.drupal.org/files/projects/taxonomy_breadcrumb-6.x-0.1-beta.ta... release attached.

MGN’s picture

I am trying the beta release (patched) on Drupal 6.4 (php 4.3.9) and I am not getting taxonomy breadcrumbs on taxonomy/term/tid pages. I haven't had any other problems - taxonomy breadcrumb control over node/nid pages works great.

I am new at this, but from poking around in the code it appears that the _taxonomy_breadcrumb_term_page function is not overriding the core taxonomy_term_page function. I can alter the function, add to it, comment out various lines, etc... with no effect, whereas changing the breadcrumb code in the core taxonomy_term_page code has immediate effect.

I checked the taxonomy breadcrumb module weight in the database system table and found it at 0, the same as the core taxonomy module, so I bumped it up to 11. But still, the function is not called. I am happy to try to help find and fix the problem, but new enough at this that I could use some suggestions on what to try next....Any advice would be appreciated.

MGN’s picture

I've got it working now. With the change below, taxonomy breadcrumbs now appear just as they ought to on taxonomy/term/tid pages.

There were just a couple of problems:

1. _taxonomy_breadcrumb_term_page was't being called on taxonomy/term/tid pages because the callback in taxonomy_breadcrumb_menu() was set for taxonomy/term instead. Also, the page arguments wasn't set right. Here is the patch for the (patched) taxonomy_breadcrumb.module:

--- taxonomy_breadcrumb/taxonomy_breadcrumb.module      2008-09-06 20:42:06.000000000 -0500
+++ ./taxonomy_breadcrumb.module        2008-09-06 20:46:27.000000000 -0500
@@ -54,10 +54,11 @@ function taxonomy_breadcrumb_menu() {
   );

   // Similiar to core menu item in taxonomy_menu, except callback is different
-  $items['taxonomy/term'] = array(
+  $items['taxonomy/term/%'] = array(
     'title' => 'Taxonomy term',
     'file'              => 'taxonomy_breadcrumb.inc',
     'page callback'     => '_taxonomy_breadcrumb_term_page',
+    'page arguments' => array(2),
     'access callback' => 'user_access',
     'access arguments' => array('access content'),
     'type' => MENU_CALLBACK,

2. After fixing this, I got the following error

PHP Fatal error:  Call to undefined function:  taxonomy_term_page() in /var/www/html/sites/all/modules/taxonomy_breadcrumb/taxonomy_breadcrumb.inc on line 13,

so I added an include_once to make sure the taxonomy_term_page() function was included...

--- taxonomy_breadcrumb/taxonomy_breadcrumb.inc 2008-09-06 20:42:06.000000000 -0500
+++ ./taxonomy_breadcrumb.inc   2008-09-06 20:17:39.000000000 -0500
@@ -9,6 +9,9 @@
  * in the system table and is set in taxonomy_breadcrumb.install).
  */
 function _taxonomy_breadcrumb_term_page($str_tids = '', $depth = 0, $op = 'page') {
+  // Include the .inc file with all helper functions
+  include_once drupal_get_path('module', 'taxonomy') .'/taxonomy.pages.inc';
+
   // Call the core taxonomy_term_page function
   $output = taxonomy_term_page($str_tids, $depth, $op);
pillarsdotnet’s picture

MGN’s picture

The patch works well for me. I have been using it on a small production site for about two-weeks now and it works as expected. The past problems with vocab editing are fixed. Taxonomy breadcrumbs appear on node/nid and term/tid pages. Taxonomy breadcrumbs also works well with custom breadcrumbs - I am using them both. Is there anything else that needs to be done to move towards an official release?

pillarsdotnet’s picture

Status: Needs review » Reviewed & tested by the community
dydecker’s picture

Subscribe. I'm having difficulty patching the file with the .diff. Could thechanges be rerolled into new beta tarball?

murz’s picture

On my Drupal 6.5 breadcrumb sets only in node/nid pages, but not work on term/tid pages. I have use the taxonomy_breadcrumb-6.x-0.1-beta.tar.gz version.
Weight of module taxonomy_breadcrumb is 10, all caches cleared. Dut Drupal don't call the taxonomy_breadcrumb_term_page() function. People, who have this worked, tell me please what version of Drupal you use and which version of patch?

MGN’s picture

The patch in #15 above addresses this issue. I am working with Drupal 6.4. I expect everything should work fine when you apply the patch.

botanik’s picture

Murz is right, patсh in #15 has got errors.
First of all there is error in hook_menu. For override taxonomy term page path must be 'taxonomy/term/%' and contain 'page arguments' => array(2).
Second error is in taxonomy_breadcrumb_term_page(). We can't callback 'taxonomy_term_page' function, because it is in 'taxonomy.pages.inc' file.
Add this before 'taxonomy_term_page': module_load_include('inc', 'taxonomy', 'taxonomy.pages');

MGN’s picture

Sounds like you haven't applied the patch http://drupal.org/files/issues/beta-to-alpha2.diff (from #15 above) to the module files in http://ftp.drupal.org/files/projects/taxonomy_breadcrumb-6.x-0.1-beta.ta.... For reference to anyone who is learning how to do this, see http://drupal.org/patch/apply. Once the module files are patched, the corrections that you have outlined will be made...

pillarsdotnet’s picture

StatusFileSize
new12.83 KB
new10.68 KB

Here's how to create a working taxonomy_breadcrumb module on a Unix-based hosting system with SSH access:

ssh <hosting-server>
cd <drupal-site-root>
cd sites/all/modules
wget drupal.org/files/projects/taxonomy_breadcrumb-6.x-0.1-beta.tar.gz
tar -zxf taxonomy_breadcrumb-6.x-0.1-beta.tar.gz
wget -O - drupal.org/files/issues/beta-to-alpha2.diff | patch -p1

For the convenience of those who don't have SSH access to a Unix-based hosting system, I have packaged the result:

pillarsdotnet’s picture

Title: Port to drupal 6.x » Port Taxonomy Breadcrumb to Drupal 6.x
botanik’s picture

Yes, sorry for my mistake .. I think taxonomy_breadcrumb-6.x-0.1-beta.tar.gz already patched ;)

spiffyd’s picture

subscribed

chawl’s picture

subscribed

Dimm’s picture

+1

superflyman’s picture

subscribed

giorgio79’s picture

Thanks for this.

Just installed it, but no breadcrumbs are displayed at all, neither taxonomy nor node pages.

PS: It turns out my theme was somehow not supporting breadcrumbs, so I switched to Zen, and I started to see breadcrumbs, but they are not complete, only the first two levels are shown of the hierarchy.

giorgio79’s picture

Noticed a few more issues

In the admin menu after applying the patch I Get this:

warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'taxonomy_breadcrumb_admin_settings' was given in .....\includes\form.inc on line 366.

Also, in views taxonomy pages, a blank entry is shown for the vocabulary, but if there is no vocab alias defined it should not show at all.

On node pages it does not show home for me.

MGN’s picture

If you disable taxonomy_breadcrumb and then re-enable it do you still get the error? Also try clearing the cache and see if that fixes it.

I've only really tested this on core themes now, but haven't seen any conflicts. You might try to verify that you get expected taxonomy breadcrumb behavior with one of the core themes enabled.

This module won't set breadcrumbs on views pages. I've patched custom breadcrumbs to do that...see http://drupal.org/node/323816#comment-1082064 if you would like to try it.

Anonymous’s picture

Subscribing

ntg’s picture

Subscribing

MGN’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Taxonomy Breadcrumb 6.x-1.0 has been released and is no longer abandoned! The new version should be more-or-less equivalent to the package in comment #23. If you have been using the beta version, please upgrade to 6.x-1.0 and report back if you have problems or suggestions for improvements (but create a new issue since this is now closed!) .