Hello,

I'm using Bootstrap theme (a subtheme of bootstrap to be exact) and the clean markup module that is very helpful to have a better control over the block and panels markup.

However, there is a small incompatibility between bootstrap theme with that module.

It's related to the block title, clean markup allow to change the markup for a block title, but bootstrap override it because of that function

/**
 * Implements hook_process_block().
 */
function bootstrap_process_block(&$variables) {
  // Drupal 7 should use a $title variable instead of $block->subject.
  $variables['title'] = $variables['block']->subject;
}

in block.vars.php

If that code is only here to keep the block title in a $title variable instrad of $block-subject, I think it could be removed as it can break some others modules that deals with block titles.

Regards,

Alex

Comments

meecect’s picture

Yes, I experienced this too. Commenting out that line fixes it. Maybe it should just check to see if $variables['title'] is set first before overriding it?

ishmael-sanchez’s picture

Status: Active » Needs review

What about a conditional to check for that module before setting that variable?

/**
 * Implements hook_process_block().
 */
function bootstrap_process_block(&$variables) {
  if (!module_exists(clean_markup) {
    // Drupal 7 should use a $title variable instead of $block->subject.
    $variables['title'] = $variables['block']->subject;
  }
}
markhalliwell’s picture

Status: Needs review » Active

No patch...

markhalliwell’s picture

Title: Incompatibility with clean markup block module » bootstrap_preprocess_block() should check if title is already set before overriding it
Version: 7.x-3.0 » 7.x-3.x-dev

  • markcarver committed e95d56f on 7.x-3.x
    Issue #2329431 by zmove: bootstrap_preprocess_block() should check if...
markhalliwell’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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