Custom block doesn't show up on block listing and pages allowed to display that block. After switch theme everything is ok, so it is not module layer issue.

I check template.php everything seems to be ok. I check CSS (display: none, etc), it seems that it's not CSS issue.

I asked about other idea's, why that block doesn't show up? I am struggling few hours and starting to have no new idea's to solved that issue

  • Make sure the region variable is getting printed in page.tpl.php which is associated with your block.
  • Make sure there is content for your block. If $block['content'] is set to empty in hook_block then the block does not appear at all.
  • Check block visibility condition as well
  • 1
    I need to set manually region column in db of this block. Now it's display on blocks listing. Thanks. – Codium Jun 15 '11 at 6:59

The thing to watch out for is the possibility of overriding hook_block() through configuration in the ui.

If you don't get it right first time in hook_block(), subsequent changes to your code won't be reflected - you have to delete the entry for that block in the database first.

Setting the region as it's machine name in the theme's .info file is important too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.