0

Why this cannot work in my profile installation?

array(
  'module' => 'views',
  'delta' => 'views-block',
  'theme' => $default_theme,
  'status' => 1,
  'weight' => 0,
  'region' => 'map_region',
  'visibility' => BLOCK_VISIBILITY_LISTED,
  'pages' => '<front>',
  'cache' => -1,
),

Is just a copy of standard's profile hook_install() and i add a views block installed with the profile in $blocks array.

All is set right except block only visible in front page ("front" is set correctly in the block config 'pages' but the visibility setting is stuck to 'All pages except those listed')

Looks like the system module re-sets them upon install.

  • I had to do this in a module that gets installed after all other modules installation, in a separate hook_install_task, is there another way in the profile? – Pan Chrono Feb 25 '14 at 11:20
0

I had to do this in a module that gets installed after all other modules installation in the profile using

hook_install_tasks()

and in the the new task's callback i enable the module with module_enable

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.