backdrop-contrib / radix

A responsive base theme with Bootstrap and Sass for Backdrop CMS.
http://docs.radixtheme.org
GNU General Public License v2.0
4 stars 2 forks source link

Undefined variables in maintenance-page.tpl.php #18

Closed jenlampton closed 8 years ago

jenlampton commented 9 years ago

It looks like the maintenance page has not yet been adapted for Backdrop. When something goes horribly wrong with a site, the maintenance page takes over to show the error, but if the maintenance page throws errors too, we're really scroodled.

I've replaced some of the variables in the maintenance page with the appropriate function calls used instead in Backdrop, but I'm not sure how much of the changes in this file are really necessary anymore.

Could you start from Backdrop's maintenance page (below) and make whatever markup changes are necessary?

<?php
/**
 * @file
 * Default theme implementation to display a single Backdrop page while offline.
 *
 * All the available variables are mirrored in html.tpl.php and page.tpl.php.
 * Some may be blank but they are provided for consistency.
 *
 * @see template_preprocess()
 * @see template_preprocess_maintenance_page()
 *
 * @ingroup themeable
 */
?>
<!DOCTYPE html>
<html<?php print backdrop_attributes($html_attributes); ?>>

<head>
  <?php print backdrop_get_html_head(); ?>
  <title><?php print $head_title; ?></title>
  <?php print backdrop_get_css(); ?>
  <?php print backdrop_get_js(); ?>
</head>
<body class="<?php print implode(' ', $classes); ?>">
  <div class="l-container">

    <header role="banner">
      <?php if (!empty($logo)): ?>
        <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
      <?php endif; ?>

      <?php if ($site_name || $site_slogan): ?>
        <div class="name-and-slogan">
          <?php if ($site_name): ?>
            <strong class="site-name">
              <?php print $site_name; ?>
            </strong>
          <?php endif; ?>

          <?php if ($site_slogan): ?>
            <div class="site-slogan"><?php print $site_slogan; ?></div>
          <?php endif; ?>
        </div> <!-- /.name-and-slogan -->
      <?php endif; ?>

      <?php print $header; ?>
    </header>

    <main role="main">
      <?php if (!empty($title)): ?>
        <h1><?php print $title; ?></h1>
      <?php endif; ?>

      <?php if (!empty($messages)): print $messages; endif; ?>

      <?php print $content; ?>
    </main>

    <?php if (!empty($sidebar_first)): ?>
      <aside class="l-sidebar-first" role="complementary">
        <?php print $sidebar_first; ?>
      </aside> <!-- /.l-sidebar-first -->
    <?php endif; ?>

    <?php if (!empty($sidebar_second)): ?>
      <aside class="l-sidebar-second" role="complementary">
        <?php print $sidebar_second; ?>
      </aside> <!-- /.l-sidebar-second -->
    <?php endif; ?>

    <?php if (!empty($footer)): ?>
      <footer role="contentinfo">
        <?php print $footer; ?>
      </footer>
    <?php endif; ?>

  </div> <!-- /.l-container -->

</body>
</html>