How to make a block available on the maintenance page (e.g. jQuery Countdown) ? Is it about setting right permissions?

  • 2
    The maintenance page typically tries to render without using the database too much or at all. Perhaps you should just embed the code you want into the maintenance file itself. Aug 29, 2011 at 17:23
  • for using jQuery Countdown, just embedding the code does not work, you have to embed/include something else in configurations, somewhere..
    – Cosmodrom
    Aug 29, 2011 at 20:04

2 Answers 2


You cannot. The maintainance page is used for when you have put the site offline, or when the site is experiencing trouble.

  1. When you put the site offline, you typically will be doing database migrations, updates and the likes.
  2. When Drupal puts the site offline, there is trouble; e.g. the databaseserver cannot be reached/is crached etc.

In case 1. You don't want your average users to reach the database, after all, no-one knows what state that database is in. The whole point of bringing it down, is to avoid people writing and reading from a crippled, stateless and changing database.

Since Drupal stores its blocks or their configuration in the database, Drupal cannot should not read from the block system.

From the relevant code:

// The bootstrap was not complete. So we are operating in a crippled
// environment, we need to bootstrap just enough to allow hook invocations
// to work

That said, you can still modify the maintainance template. Just be very carefull with calling Drupal API's and/or the database in there. The maintainance theme is there for the cases when these are not available. And if they are not, your users are going to see ugly fatal errors (or nothing at all).

  • 1
    There is also case 3, when site is alright and working, just starting its life. And it pretty much wants a days countdown until first breath. :)
    – Cosmodrom
    Sep 1, 2011 at 17:59
  • I understand there are many reasons when one wants a simple block. But if you know what this screen is used for, you can understand that adding blocks the way you want will not work. Adding some countdown js+html to the maintainance template will work fine for your case, though.
    – berkes
    Sep 2, 2011 at 7:59

This answer might come a little late but might be helpful.

What you can do is coding the maintenance page directly from Drupal admin/config/development/maintenance

Here is an example using bootstrap.

Hope this helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.