1

A custom module defines some blocks, with this sample definition:

  return array(
    'info'        => 'Site Header',
    'cache'       => DRUPAL_NO_CACHE, // @TODO change it later
    'status'      => TRUE,
    'region'      => 'header',
    'visibility'  => BLOCK_VISIBILITY_NOTLISTED,
  //  'page'        => '<front>',
  );

When enabling the module, I get the following error:

The block Site Header was assigned to the invalid region header and has been disabled. 

The same happens for all blocks defined in this module. The regions exist in both admin and site theme, as I inserted a var_dump in block.admin.inc.

array(13) {
  ["content"]=>
  string(7) "Content"
  ["bigBox"]=>
  string(7) "Big Box"
  ["headline"]=>
  string(18) "Headline caroussel"
  ["leftCol"]=>
  string(17) "Colonne de gauche"
  ["rightCol"]=>
  string(17) "Colonne de droite"
  ["navigation"]=>
  string(14) "Navigation bar"
  ["header"]=>
  string(6) "Header"
  ["footer"]=>
  string(6) "Footer"
  ["page_top"]=>
  string(8) "Page top"
  ["page_bottom"]=>
   string(11) "Page bottom"
  ["dashboard_main"]=>
  string(16) "Dashboard (main)"
  ["dashboard_sidebar"]=>
  string(19) "Dashboard (sidebar)"
  ["dashboard_inactive"]=>
  string(20) "Dashboard (inactive)"
}

Does anyone have an idea of how I can overcome this issue?

  • Which version of Drupal are you running? Please see drupal.org/node/1172560 – pamatt Oct 24 '13 at 17:17
  • @pamatt - D7 is used. I saw this post before posting here, it deals with a bug in boost. At first I thought I only had to redeclare regions in subtheme but this did not work. – stefgosselin Oct 24 '13 at 17:33
  • It's not only boost-related. It seems to be a problem with Drupal's core, which has been dealt with with Drupal 8 and probably backported to 7... have you updated Drupal to 7.23? – pamatt Oct 24 '13 at 17:56
  • 1
    Please see drupal.stackexchange.com/a/128202/15055 – leymannx Aug 29 '14 at 13:15

Your Answer

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

Browse other questions tagged or ask your own question.