Closed (fixed)
Project:
Crumbs, the Breadcrumbs suite
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2010 at 12:59 UTC
Updated:
23 Aug 2012 at 21:53 UTC
My breadcrumb looks like this:
URI: /collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729/25726/25720/25721
Is there any way to improve the crumbs to ignore duplicates?
For each case, I've to do a lots of customization and remove all default crumbs plugins, because they are not working as expected.
Comments
Comment #1
kenorb commentedBacktrace:
Comment #2
kenorb commentedRelated: #967680: Cannot disable menu.hierarchy:* rule
Done:
Still the same;/
Comment #3
donquixote commentedHi,
what kind of url is that??
Am I right in assuming that you have a lot of taxonomy terms all with the same name? Or are you setting the crumb title to "Year 5 literacy" all the time?
Are 25714, 25730, 25712 etc all taxonomy term tids?
Comment #4
kenorb commentedYes, those numers are tids.
And collection is custom menu callback: $items['collection/%collection_node/%']
Sometimes I just confused what's going on, because still can't figure out why does it happen. I know that each item should have separated crumbs, but why duplicated? And from where it's came from. I'm using too much xdebug to find out.
Comment #5
donquixote commentedIf you look at the paths of the crumbs, they seem to be correct, and no duplicates.
Just the titles are identical.
So, what is the title of the terms in question? Do the terms all have the same title? Or is this just crumbs, that is setting a wrong title for the items?
Comment #6
kenorb commentedAll URIs
collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729/25726/25720/25721
collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729/25726/25720
collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729/25726
collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729
collection/9143/node/19500/taxonomy/25714/25730/25712/25710
collection/9143/node/19500/taxonomy/25714/25730/25712
collection/9143/node/19500/taxonomy/25714/25730
collection/9143/node/19500/taxonomy/25714
collection/9143/node/19500/taxonomy
collection/9143/node/19500 has redirect to collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729/25726/25720/25721
has the same title, but: 'Learning objectives'
Which doesn't appear anywhere in breadcrumb.
Only collection/9143 has 'Year 5 literacy'.
Comment #7
donquixote commentedWhat is the name of the term 25710 ?
What is the name of the term 25712 ?
etc
Comment #8
kenorb commentedDifferent names:
Comment #9
donquixote commentedOk, so the correct breadcrumb titles would be something like
9 Creating and shaping texts > 8 Engaging and responding to texts > 10 Text structure and organisation
I imagine this happens because of you changing the path of the items, with your little hack. The code that chooses the title looks at the original path, and then you go and change that path to something else. Then the find() code will find the parent for the manipulated path.
That's my theory. I told you it's a bad idea to mess with the path...
And I think what you want to do can be done quite easily without the hack.
Comment #10
kenorb commentedThe problem is that probably none of my custom rules are applied in this case.
I really can't figure out which rule generating those crumbs.
Comment #11
donquixote commentedWhat about changing this
collection/9143/node/19500/taxonomy/25714/25730/25712/25710/25729/25726/25720/25721to this
collection/9143/node/19500/taxonomy/25714,25730,25712,25710,25729,25726,25720,25721with router path
collection/%collection_node/node/%node/taxonomy/%taxonomy_terms_multiplewith respective wildcard loaders.
Methods with suffix would look like this:
findParent__collection_x_node_x_taxonomy_x($path, $item)I imagine this would be easier to deal with by the wildcard loader, and you would get the complete info in $item['map']. Core taxonomy does the same, btw - separation by comma.
-----
This entire request is very specific imo, and I think I could more effectively spend my time on it if I were involved in the development of your site.
I recently found an article about faceted breadcrumbs. I think this is very close to what you are describing.
I would very much like to support this idea with crumbs, but I will only work on it if I have a real-world use case. For most of the sites I have worked on (mainly organization websites), the static location-based breadcrumbs are the better solution. (not all of them use crumbs, but probably they will once I feel confident enough about the 2.x branch)
Probably a big part of the code for faceted breadcrumbs would be rather site-specific, but some changes to crumbs core might be required to make them work.
Check out #1048028: Support "faceted" breadcrumbs for search/filter/taxonomy pages.
Comment #12
donquixote commentedPlease re-open if it still applies and it is still an issue for you. It seems to be quite specific/exotic, and probably only applies in D6.
Comment #13
donquixote commentedComment #14
donquixote commented