I've noticed that on some of my pages, the easy-breadcrumb_segment-1 piece isn't being properly generated. For example, here's how the breadcrumb looks on the webpage:

Home » » Customer Service Coordinator

It should look like this:

Home » Job Openings » Customer Service Coordinator

Here's the way the html code looks:

<div class="content">
<div class="easy-breadcrumb">
<a href="/drupal/" class="easy-breadcrumb_segment easy-breadcrumb_segment-front">Home</a>
<span class="easy-breadcrumb_segment-separator"> » </span>
<a href="/drupal/job-openings" class="easy-breadcrumb_segment easy-breadcrumb_segment-1"/>
<span class="easy-breadcrumb_segment-separator"> » </span>
<span class="easy-breadcrumb_segment easy-breadcrumb_segment-title">Customer Service Coordinator</span>

You'll notice the the text for the link and closing </a> are missing. This only happens when the easy-breadcrumb-segment-1 directory uses dashes in the path, i.e. if the path is <strong>job-openings/customer-service-coordinator</strong> it breaks but if the path is <strong>job_openings/customer-service-coordinator</strong> it works.

Edit: Correction, it only seems to work when I initially change the path. When I revisit the link, the easy-breadcrumb-segment-1 link disappears again. I've even tried it using spaces and the same thing happens, initial testing seems to work but upon subsequent linking to the page, the breadcrumb breaks.

Edit 2: Seems like what broke it the second time was when I tried changing the parent location to match the child location, i.e., if I changed the child to be job_openings/customer-service-coordinator AND changed the parent to be just job_openings, then it broke. Once I changed the parent back to job-openings, the breadcrumb worked again. <queue Twilight Zone music > Not sure if this is because the parent is a view and changing the path in the view messed up the menu pointing to the view. As soon as the view path was changed, the link to the view disappeared in the menu. When I re-added the link to the menu, everything went "wonky". Then I changed the view path back to what it originally was and updated the menu. Then suddenly, the view was listed in the menu twice. I left the child URL paths the same and deleted the duplicate menu listings. I've now tested it in three different browsers (Chrome, IE and Firefox) and the breadcrumbs seem to be working so long as the child paths use a different construct (either a underline or a space) than the parent (which uses a dash).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

navoff’s picture

Issue summary: View changes

Initial evaluation of what is causing the output to fail was incorrect. Subsequent testing proved the work around was not valid.

sonemonu’s picture

Assigned: Unassigned » sonemonu
Status: Active » Postponed (maintainer needs more info)

Hi navoff, thanks for reporting your issue.

So the issue is still there? If so, could you please try cleaning your cache?

Thanks!

navoff’s picture

Yes, the issue is still there. The only way to generate the easy-breadcrumb-segment-1 element in the breadcrumb is by faking out the directory structure in the child element. However, by doing so, you lose the hyperlink to the parent item in the breadcrumb.

navoff’s picture

Attached are samples of what the breadcrumb trail looks like. The first sample is when I "fake" the path out (i.e. the parent item uses a dash in the url but the child uses underscores). The second is for the one that works where I don't have to fake out the url (parent is only one word, no dashes or underscores).

To muddy the waters even further, today I added another set of child elements to a different section of the website. All of the breadcrumbs and links worked just fine without the hack (sample 3).

However, every time I try to change the URL on the sections that don't work so that the parent is listed correctly (with the dash instead of the underline), the easy-breadcrumb-segment-1 element disappears. So, either I have to do the hack with no link, or I have a missing segment to the breadcrumb.

I have been trying to figure out what might be different about the two sections that aren't working that would account for the problem and so far, I can't.

Edit: One thing comes to mind, the page I was adding child elements to today is created from a panel whereas the others are all created from views.

Greg Boggs’s picture

Most likely, what's happening here is menu caching. To pull the correct title for view breadcrumbs it's using the menu which is cached. So, to get breadcrumbs on views to work correctly, set the menu for them and clear all caches and then load the page.

Having - or _ in your paths should not affect breadcrumbs and niether should parent or children relationships.

sonemonu’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
sonemonu’s picture

Issue summary: View changes

Further testing revealed a nuance not originally detected.