Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2007 at 12:02 UTC
Updated:
19 Sep 2012 at 20:17 UTC
If I use views to override the "Taxonomy/Term" page the breadcrumbs on "Taxonomy/Term" pages do not work anymore (I only get "Home", nothing more). I would expect - as long as I haven't changed anything on the view - that I would get the same breadcrumbs as with the default "Taxonomy/Term" pages (which indicate the terms in the hierarchy)
Comments
Comment #1
richyrich commentedYip, I've having the same problem.
The taxonomy_breadcrumb module stopped working when I started using the taxonomy/term override. It seems to work only when you load the node. However, at each term level (i'm using term hierarchy) and at the main vocabulary level, the breadcrumbs are not working.
I tried looking at the code for the view module, but it's a little too technical for me at this point being a new drupal user.
I'll leave it to the experts for their advice/fix.
thanks
Comment #2
merlinofchaos commentedOk, this turns out to be a tough one; it's not technically a bug because it's a feature that Views simply doesn't have, and I'd never thought about. Switching it to a feature request. I put a little time into trying to add this, but it has a lot of ramifications that'll take quite awhile to work out.
Comment #3
_craig commentedSomewhat related to http://drupal.org/node/126313.
Comment #4
rapidsynergy commentedHi I ran into this issue also. I'm not sure if this is helpful but I was able to devise a workaround with the Viewfield module and CCK. Creating a separate node that contains the view enables the taxonomy_breadcrumbs to work as expected. It's a little extra work but does the trick...
Cheers,
Eric
Comment #5
laurentchardin commentedSounds to me that the views theme (in template.php) is rendered way before the taxonomy_breadcrumb is called in... so at the time the engine renders the view, the static breadcrumb is not already updated.
In taxonomy_breadcrumb, it occurs during the nodeapi hook.
Comment #6
laurentchardin commentedQuick and (very) dirty fix in your template.php overriding function:
Comment #7
alanvee commentedI may be seeing a variation of this issue. I have a 5.1 site with the latest Views and Tax-Breadcrumbs.
It is using the Golden Hour theme.
To see the problem, do this:
Go to http://www.sargasso-sea.net
In the Nav column, click on "Poetry"
This produces a Views-generated list View of some Pages. Click any poem in the list
When it opens there is a tag out to the right - click on that OR click on the word "Poetry" at the top
This will take you to a broken page - the whole left region is gone and the CSS appears to be messed up.
You can go back and forth and see the nav-bar and background change.
I put the patch in (on a local server) and it totally kills the View from showing anything.
=Alan R.
Comment #8
bsuttis commentedThe patch above does the same thing to my view, it disappears.
Comment #9
bsuttis commentedPatch above is now working for me with beta5. Thanks laurentchardin, this solves a major headache.
Comment #10
_craig commentedShould there be a check first to see if taxonomy_breadcrumb is installed and enabled? What happens if you disable the taxonomy_breadcrumb module and look at your views page? Do things blow up?
Comment #11
bsuttis commentedGood call, I've added to the code a check for taxonomy_breadcrumb
Disabling taxonomy_breadcrumb just results in the crappy breadcrumb coming back -- without the check, you're right, it explodes.
Comment #12
andyschm commentedThis worked for a while, nice breadcrumbs, nice view. Now it is broken. Nice breadcrumb, view is *empty*. What happened?
Comment #13
andyschm commentedDisappearing view problem solved; this snippet can be moved into the "argument handling code" section of the view, instead of putting it into the theme template.
Comment #14
summit commentedWhat piece of snippet please?
Could you state exactly what needs to be put in argument handling?
Thanks in advance,
greetings,
Martijn
Comment #15
andyschm commentedInstead of using phptemplate_views_view to override the breadcrumb (as in the example above), I now just put the code into the argument handler section of the taxonomy_term view. I can't say exactly why putting it into hook_views_view didn't work... it just... didn't. :(
Actually this seems a bit more elegant to me, and does not require any "checks" to make sure that the taxonomy_term view is actually active, since it is attached directly to that view, and there is also zero possibility of the hook interacting with some *other* view. I've also re-used the same trick to customize the breadcrumbs on a number of other views where the default behavior of the argument handler doesn't create the breadcrumb trail that I want.
Comment #16
merlinofchaos commentedWould someone be willing to write this up in the Views Snippets section, (reference this issue) and then mark this issue fixed?
Comment #17
mulberry commentedIs there a fix to this yet?
Comment #18
emlomar1 commentedAnother dirty/easy solution based on "bsuttis" solution:
Edit the views.module file -> in function "views_set_breadcrumb" ->
Replace
drupal_set_breadcrumb($breadcrumb);for
At least it works for me!.
Taxonomy context 5.x-1.x-dev
Taxonomy breadcrumb 5.x-1.4
Views 5.x-1.6
Comment #19
anthonym commentedAndyschm, would you mind sharing exactly what code you include in the argument handler section of the view? (http://drupal.org/node/114548#comment-502154)
Comment #20
andyschm commentedAdminster > Views > Edit "taxonomy_term" (override) > Argument Handling Code:
This snippet also generates the URLs to the parent term pages according to how pathauto would... YMMV; replace that bit with just the tid if you are not using pathauto to alias the term pages.
Comment #21
giorgio79 commentedemlomar1's 3 liner solution has worked for me very nicely as well! Latest Drupal 5, breadcrumb and views modules :)
I hope it will be committed to the core views module
Comment #22
aterchin commentednothin' for me yet, after inserting the argument code from #20
Comment #23
anthonym commentedThis is the exact code (minus php brackets) I use in the argument handler field (adapted from comment #11 above). It's been working well for me.
I tried andy's code also (#20) but there was some version incompatibility.
Comment #24
aterchin commentedno luck. now im thinking its something to do with my configuration. should be outputting 'vocabulary name > term' but its not, for any of my taxonomy based views. appreciate the help anthonym but i think my problem may be somewhere else and i'm being slow in grasping it.
Comment #25
beginner commentedsubscribing.
Comment #26
gcassie commentedI'm using this in the argument handling code and it seems to be working. Cribbed from taxonomy.module
Comment #27
christefano commentedGeorge, that looks very useful. Thanks!
Comment #28
merlinofchaos commentedIf that works for people, a post in the views snippets section would be lovely (and marking this fixed).
Comment #29
sunComment #30
davemybes commentedThe code in #26 seems to work well, so I created a book page for it: http://drupal.org/node/449192. Setting to fixed.
Comment #31
Rhino commentedReliving this problem on Drupal 6 - any suggestions on how to fix it there?
Comment #33
account-deletion-needed commentedThe following code solved the problem for me under Drupal 6 (taxonomy_breadcrumb 1.0, views 2.6). Put this into your template.php:
Cheers
Comment #34
emilyf commented@drimsun
thanks, works great.
Comment #35
eiland commentedthe drimsum solution didnt work, the solution in #26 is for Drupal 5 and the solution in http://drupal.org/node/599442 doesnt seem to work...
Comment #36
9802008 commentedeiland try clearing your cache or swopping to another theme and then changing back to the original theme. #33 worked for me, thanks drimsun!
Comment #37
ch_masson commented#33 did not work for me (drupal 6.16, views 6.x-3.0-alpha3, taxonomy_breadcrumb 6.x-1.1)
What calls this function?
Do I need to rename the function when it is called?
Do I need to rename the return statement at the end and substitute "theme" by the name of my theme?
Thanks for your help!
Christian
Comment #38
merlinofchaos commentedPlease do not take closed issues for Views for Drupal 5 and make them Views for Drupal 6 issues. THey're not similar
Comment #39
hacmx commentedThanks, this work too well,
/clap
Comment #40
ramkiboy commentedHello All,
I am new to Drupal, but I face the same issue.
The question is : Where can I find the "Argument Handling Code section of View"? Where should I paste the code?