Backdrop 1.5.0 introduces a change to the way maintenance pages (maintenance-page.tpl.php files) are handled. In previous versions of Backdrop, the regions within a maintenance page were provided through a theme's .info file:

regions[content] = Content
regions[sidebar_first] = Sidebar first
regions[sidebar_second] = Sidebar second

However, the definition of regions in themes had been almost entirely removed from Backdrop due to the introduction of the Layout module and layout .info files. The remaining use of regions from themes on maintenance pages was an oversight. The use of custom region names and the associated functions used to set content on the maintenance page have been removed.

maintenance-page.tpl.php Variables

As blocks cannot be positioned on the maintenance page and content was assigned manually by either the Installer (/core/install.php) or Database updater (/core/update.php), the available regions for the maintenance page were changed from being theme-defined to being a static list of available regions. These new regions are:

  • content
  • sidebar
  • footer

For themes that have maintenance-page.tpl.php files, they may need to update their template files to use these new region names.

Sidebar in maintenance-page.tpl.php before Backdrop 1.5.0:

    <?php if ($sidebar_first): ?>
      <div id="sidebar-first" class="sidebar">
         <?php if ($logo): ?>
          <img id="logo" src="<?php print $logo ?>" alt="<?php print $site_name ?>" />
        <?php endif; ?>
        <?php print $sidebar_first ?>
       </div>
    <?php endif; ?>

Sidebar in maintenance-page.tpl.php after Backdrop 1.5.0:

    <?php if ($sidebar): ?>
      <div id="sidebar" class="sidebar">
         <?php if ($logo): ?>
          <img id="logo" src="<?php print $logo ?>" alt="<?php print $site_name ?>" />
        <?php endif; ?>
        <?php print $sidebar ?>
      </div>
    <?php endif; ?>

Footer in maintenance-page.tpl.php before Backdrop 1.5.0:

  <footer role="contentinfo">
    <?php print $page_bottom; ?>
  </footer>

Footer in maintenance-page.tpl.php after Backdrop 1.5.0:

  <footer role="contentinfo">
    <?php print $footer; ?>
  </footer>

backdrop_add_region_content() and backdrop_get_region_content() Removed

In Drupal 7, the functions drupal_add_region_content() and drupal_get_region_content() were used to add and get the blocks within a theme's regions. Ever since Backdrop 1.0, these functions (or their backdrop_* equivalents) have not been used for normal page templates in Backdrop, because the Layout module handles the positioning of blocks. However these functions had still be used internally within install.php and update.php to handle the maintenance pages. These functions have now been removed. As modules are already unable to affect the install.php and update.php scripts, no replacement is provided for these functions.

If you had written a custom script that utilized these functions to set region content and then print the maintenance page, these custom scripts will need to be updated.

Before Backdrop 1.5.0:

  backdrop_add_region_content('footer', $footer_content);
  backdrop_add_region_content('sidebar_first', $sidebar_content);
  print theme('maintenance_page', array('content' => $output));

After Backdrop 1.5.0:

  print theme('maintenance_page', array('content' => $output, 'sidebar' => $sidebar_content, 'footer' => $footer_content));
Introduced in branch: 
1.x
Introduced in version: 
1.5.0
Impacts: 
Theme developers