Problem

I have a Drupal commerce site and the breadcrumbs were working just fine for my product display nodes until I managed to add in a side block a view containing suggested products. These suggested products are not displayed in 'full' view mode, but as a custom view mode (Display Suite).

After this, the current breadcrumb (and parent terms) refer to the last suggested product (in the block) and no longer to the main product display node (in the main content area).

Solution

After digging a bit, I found the culprit being a simple mistake in the code at line 55 of taxonomy_breadcrumb.module.
Instead of being:

  if ($view_mode = 'full' && !drupal_is_front_page()) {

it should be instead:

  if ($view_mode == 'full' && !drupal_is_front_page()) {

I've tested it enough to confirm the breadcrumbs work fine now with or without a custom view node on the side.
I don't know how to create patches but I'll try making one tomorrow just to contribute my 2 cents to this awesome Drupal community.

Comments

roderik’s picture

Status: Needs review » Closed (duplicate)

See #1665990: Breadcrumbs not displaying the correct view mode - hence not working with Display Suite view modes

(Note: not checked descriptions. I just happened to check patches for this module and spotted the duplicate patch.)

roderik’s picture

Issue summary: View changes

changed headers