When selecting a wrapper for the Block title, it will only output the title if it is wrapped in a header tag (h1, h2, ...). If any other element is selected, the title will not show at all.

Comments

jremydeaton’s picture

Title: Block title wrapper on outputs header elements. » Block title wrapper only outputs header elements.
mparker17’s picture

Status: Active » Postponed (maintainer needs more info)

I'm unable to reproduce this with the Navigation menu block on a fresh D7.36 site using the Bartik theme and the clean_markup_blocks module, version 2.7.

But, so that I can be 100% sure, could I trouble you to tell me:

  • which theme you are using, and it's base theme if applicable (some themes use their own template files which conflict with Clean Markup and prevent the title wrapper from being output properly),
  • which element you are selecting for the title wrapper (certain CSS in the theme may hide the title by default),
  • which block you are changing the title of (certain blocks don't have titles by default),
  • the value of the following settings on the Configure block page:
    • Block title (certain settings may cause it to disappear)
    • Clean markup options -> Additional attributes (malformed attributes can cause invalid HTML)
    • Clean markup options -> Visually-hide block title (this is intended to hide the title field from sighted users, but make it visible to screenreaders).

... this information will help me to determine if whether there's a problem with the Clean Markup module, an incompatibility between the Clean Markup module and the theme you are using, and/or a problem with a specific configuration that's preventing it from working.

Thanks!

jremydeaton’s picture

Answers to your questions:
Theme = bootstrap (This might be the issue here)
Which element = I'v tried them all, but I mainly just wanted a div
Which block = Menu block
Setting values=
Block Title = string ("my title")
Clean Markup options = no additional attributes
Clean Markup options = did NOT set visually hide block title

Hope that helps. Sorry so late getting back to you. Weekend and all.

mparker17’s picture

Status: Postponed (maintainer needs more info) » Active

I'll check it out. Thanks!

mparker17’s picture

Priority: Major » Normal
Status: Active » Needs review

@jremydeaton,

I installed Drupal 7.36, Clean Markup 7.x-2.7, and the Bootstrap theme version 7.x-3.0, and I replaced Bootstrap's theme/block/block.tpl.php with Clean Markup's modules/clean_markup_blocks/block.tpl.php to make it work.

I can confirm that Bootstrap interferes with Clean Markup's ability to override the block title wrapper.

After a bit of investigation, I can confirm this is due to the following line in Bootstrap's theme/block/block.vars.php::bootstrap_process_block():

$variables['title'] = $variables['block']->subject;

... and that removing this line fixes the problem. It's safe to do this because Clean Markup already takes care of this in modules/clean_markup_blocks/clean_markup_blocks.module::clean_markup_blocks_process_block().


Unfortunately, because theme functions in themes always run after theme functions in modules, there's not really any way for me to fix this in the clean_markup module.


A few tips:

jremydeaton’s picture

Status: Needs review » Closed (works as designed)

Still not working after removing bootstrap_process_block() on my initial site. Problem has to be within another module, Because I did a fresh install with no bootstrap theme or sub-theme and it worked.

initial site - Tried to change it to just a paragraph tag for testing and the element is removed completely.

fresh install - element shows up as expected.

In my free time I will try to pinpoint which module is causing the issue, and report back here. In the meantime, this issue should be closed as the module works as expected.

Thank you.