1
votes

Prelude

  • Drupal 7
  • Bootstrap Business (Active Theme)
  • Turn on Maintenance Mode

Actions that I have already carried out

  1. Copy maintenance-page.tpl.php from modules/system/maintenance-page.tpl.php
  2. Edit to your needs
  3. Paste it on theme's root folder --> /public_html/sites/all/themes/bootstrap-business
  4. Set $conf variable in /public_html/sites/default/settings.php : $conf['maintenance_theme'] = 'bootstrap_business';`

Nonetheless, the site keeps on showing the modules/system/maintenance-page.tpl.php . I don't know why it is not working. I´ve also tried:

  • Adding a maintenance-page--offline.page.tpl.php
  • Setting the theme name as bootstrap-business

None of the above work. I don't think spending 45 minutes on such a simple task is adequate. I know I could just edit the modules/system/maintenance-page.tpl.php, but I don´t believe that's the right way to go.

Any suggestions?

1

1 Answers

1
votes

Clear/Flush caches (Theme Registry cache) and try again. If you already did that and did not work add a page preprocess function to your default theme template.php:

bootstrap_business_preprocess_maintenance_page(&$variables) {
  if (isset($variables['db_is_active']) && !$variables['db_is_active']) {
// Template suggestion for offline site
    $variables['theme_hook_suggestion'] = 'maintenance_page__offline';
  }
else {
// Template suggestion for live site (in maintenance mode)
    $variables['theme_hook_suggestion'] = 'maintenance_page';
 }
}

Related question: https://drupal.stackexchange.com/q/76946/12163