Under the conditions below, the 'Site' portion of the breadcrumb is repeated.

  1. Enable apachesolr_search and facetapi
  2. Enable content type and post date facets
  3. Disable node and user searches and set apachesolr to the default
  4. Add the facet blocks so they are rendered on the search page

Selection_047.png

Comments

jhedstrom’s picture

The reason for this can be seen here.

$last ==  '<a href="/search/site">Site</a>'
$this_page == '<a href="/search/site/ero" class="active">Site</a>'

due to the active class, they aren't equal so the $last != $this_page evaluates to TRUE.

cpliakas’s picture

Component: Code » User interface
Priority: Normal » Major

jhedstrom,

Thanks for the detailed explanation. This bug is confirmed.

Chris

klaasvw’s picture

Status: Active » Needs review
StatusFileSize
new1008 bytes

Here's a patch that removes the $this_page item entirely.

I'm not sure why this was added in the first place. Isn't it so that by default drupal's breadcrumb never links to the current page you're viewing? That's exactly what $this_page is, a link to the current page. So to stay consistent with how breadcrumbs work in drupal it might be better to remove this.

cpliakas’s picture

Status: Needs review » Reviewed & tested by the community

I have been looking at this for a while. I have no idea why the code is necessary, I just know that at one time it was. Removing it seems to fix the problem, so I am marking as RTBC. Let's see if people yell at me once this code is circulated.

cpliakas’s picture

Status: Reviewed & tested by the community » Fixed

Committed to the 7.x versions of Facet API.

Congrats on becoming the 32nd code contributor to Facet API!

klaasvw’s picture

Thanks for committing this!

cpliakas’s picture

NP. Look forward to your next patch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.