For some reason this module is also attaching the block to the breadcrumb. This is causing custom breadcrumb modules to be unusable.

Comments

Stolinski’s picture

Version: 7.x-1.x-dev » 7.x-1.11
cameron tod’s picture

Would you mind posting a screenshot? It will be helpful with debugging.

cameron tod’s picture

Status: Active » Postponed (maintainer needs more info)
chrisjlee’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new7.5 KB

Happens to me too on the admin overlay when you edit a piece of content. The gray box is the dropdown on the admin side (in the photo)

Selection_001.png

The solution to changing your click event function:

Before
$('a.menu-attach-block-drop-link', context).click(function(event) {

After
$('.menu a.menu-attach-block-drop-link', context).click(function(event) {
or something like that. Or only attaching the block to certain menus.

malcomio’s picture

Issue summary: View changes

I had the same issue on a site recently. I couldn't see a way to prevent the block being added, so ended up doing something a bit hacky and stripping it out inside theme_breadcrumb:

In my case I knew that the menu_attach_block would only ever be in element 1 of the breadcrumb array - you might need to do something more generic.

  // Make sure menu_attach_block content doesn't appear.
  // Would be nice to patch the module: https://drupal.org/node/1971752
  if (strpos($breadcrumb[1], 'menu-attach-block')) {
    // Get the position of the end of the first link.
    $link_end = strpos($breadcrumb[1], '/a') + 3;
    $breadcrumb[1] = substr($breadcrumb[1], 0, $link_end);
  }
malcomio’s picture

A similar issue came up when using the Site map module.

In that case we needed to override theme_site_map_menu_link(), adding this line:

unset($element['#localized_options']['menu_attach_block']);
slydevil’s picture

Patch attached to address blocks showing up in the breadcrumb and in the sitemap.

slydevil’s picture

Forgot the isset()...new patch attached.

  • Cameron Tod committed ea22078 on 7.x-1.x authored by slydevil
    Issue #1971752 by slydevil, chrisjlee: Attaches Block to Breadcrumb
    
cameron tod’s picture

Status: Active » Fixed

Looks like my tests are borked but this looks pretty safe without them. Thanks!

Status: Fixed » Closed (fixed)

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