After installing taxonomy_context, I found that the breadcrumbs trail on the top of the page (e.g. Home >> Places >> Africa >> Egypt) is not visible anymore.

Why does taxonomy_context do that? It should not disabled such a useful feature.

CommentFileSizeAuthor
#7 taxonomy_context-breadcrumb-patch.txt991 byteskbahey

Comments

kbahey’s picture

Her is a comparison of the HTML source before the taxonomy_context module, and after it:

Before:

      <div id="main">
        <div class="breadcrumb"><a href="">Home</a> &raquo; <a href="taxonomy/term/12">Places</a></div>
        <h1 class="title">Africa</h1>

After:

      <div id="main">
        <div class="breadcrumb"><a href="">Home</a></div>
        <h1 class="title">Something</h1>
          <div id="help"><div class="term-container">

  <div class="term">
   <div class="description"></div>
   <div class="links"><a href="admin/taxonomy/edit/term/50" title="Administer this term.">administer</a></div>
  </div>
</div>
<div class="clearit"></div>
nedjo’s picture

Assigned: Unassigned » nedjo

I've removed the drupal_set_breadcrumb call (which I think worked in 4.4 but apparently isn't needed now).

kbahey’s picture

Hi

Thanks for responding.

I did some debugging on your code. I reenabled the commented part about breadcrumbs.

The issue is not with the code in the taxonomy_context_get_breadcrumb() function, but rather the call to this function from taxonomy_context_init(). $context->tid is set to nothing, and therefore taxonomy_context_get_breadcrumb() returns nothing.

I am not sure where this $context->tid should be set from, but that is the cause of the problem where breadcrumbs are not displayed.

kbahey’s picture

Changing status to active.

Even after commenting out this section, the breadcrumbs are not displayed by Drupal.

kbahey’s picture

Clarification:

The breadcrumbs do show when you are on a taxonomy, but do not get displayed when you are on a node.

So if you are on a term, and listing all the child nodes under it, the breadcrumbs will show (from Drupal, not from taxonomy_context). But of you click on a term, Drupal will not show any breadcrumbs about the node (only Home).

I don't think this is a problem with taxonomy_context itself, but why does the breadcrumb not show??

Anonymous’s picture

There is a bug in the module.

function taxonomy_context_init() {
[snip]

// Commented out in response to issue http://drupal.org/node/11407
if (($mode == "taxonomy") || ($node_type == "story") || ($node_type == "page")) {
drupal_set_breadcrumb(taxonomy_context_get_breadcrumb($context->tid));
}
}

The problem with the commented code is that there is no $context defined here. If you add this line:
$context=taxonomy_context_get_context();
right before the if statement
and you uncomment the rest, the module works brilliantly!

kbahey’s picture

StatusFileSize
new991 bytes

Patch for making breadcrumbs appear when using taxonomy_context.

Nedjo, can you please incorporated into CVS.

nancydru’s picture

Version: » master
Status: Needs review » Closed (fixed)

Reopen this with a current release if it is still valid.