First, test it out, and post screenshots. Then let's see what we might want to do to make the maintenance page work well. Even on sites that use other themes, Bartik will be the default maintenance page for those sites. Anytime upgrades are in progress or the db goes down or something else happens — Bartik is what will show up.

Let's make it kick ass.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jensimmons’s picture

For reference, this is an example of the D6 maintenance page at work. Even for a site that has a custom theme (but for which no one made a custom maintenance page).

a screenshot of the Site Offline Page in Garland

jensimmons’s picture

Title: Make the Maintence Page Kick Ass » Make the Maintenance Page Kick Ass
bleen’s picture

FileSize
33.21 KB

this is the maintenance page as it stands in bartik:

I'm not sure what more we can/want to do with this... I can see using an oversized icon (a clock maybe, or some gears, or some tools) in light gray floated to one side, but that doesn't seem very Drupl-y (as far as core themes go) to me.

Thoughts?

Jeff Burnz’s picture

bleen, disable the database and see what happens.

bleen’s picture

ok ... when I turn off mySQL (in MMAP) I get an error page in the style of garland, even if the custom theme (and admin theme) are both set to seven.

How can I set up d7 to use Bartik for that page? Only then can we decide how that page should look

jensimmons’s picture

You have to hack core. Somewhere. Once Bartik is in core, I want to submit a core patch to change the throw-back maintenance page to Bartik. AND I want us to create a maintenance page for Bartik that will work with *any* website. Maybe it doesn't have the Bartik-ish header..... something clean and neat that will work for every website no matter what branding / custom theme they have. Since almost every Drupal site out there will end up with the Bartik page showing up when the site is down.

Yes, some shops make custom maintenance pages. But frequently it doesn't happen. Even Enterprise-level projects might not have their own custom one, since frequently developers can only do work that is put into a user story and prioritized into a sprint.... and project owners have no idea what this maintenance thing it. Until it shows up on the site one day, and someone gets mad...........

So let's make one that works for all sites, not just Bartik sites.

JohnAlbin’s picture

You have to hack core. Somewhere.

Nope. No core hacking is required. Since the database is down, Drupal has no way to determine what the theme has been selected (since all config is stored in the database).

HOWEVER, any config can be overridden by hard-coding the value inside the $conf array in your site's settings.php file. There's actually a comment in settings.php specifically about how to set the maintenance theme.

$conf['maintenance_theme'] = 'bartik';
Georg’s picture

FileSize
88.82 KB

If you set the maintenance theme as described in #7, before installing Drupal... - Bartik rocks (see screenshot, I don't know how to make it appear in the comment.)

On top of the list of steps there is something... it looks wrong, but it is there, no matter which browser.
This something is <h2 class="element-invisible">Installation tasks</h2>

jensimmons’s picture

Issue tags: +jen's hit list

.

yoroy’s picture

#3 looks perfectly fine to me, no need to kick ass. Just be clear about what's going on, there's nothing else to offer for regular visitors anyway.

JohnAlbin’s picture

@georg The .element-invisible heading is possibly a core issue. See #766444: Add !important to CSS attributes of .element-invisible in system-behavior.css.

IMO, it doesn't make any sense to copy override the .element-invisible rule in Bartik just to add !important. :-\

jensimmons’s picture

Before the changes I'm about to make:
a screenshot of the site totally broken, showing the maintenance page

jensimmons’s picture

Assigned: jensimmons » Unassigned
Status: Needs work » Active
FileSize
678 bytes

After:

screenshot after the patch

jensimmons’s picture

Assigned: Unassigned » jensimmons
Status: Active » Needs work

First round — committed, and fixed.

But now it needs another round of pretty. Assigning to myself.

Bojhan’s picture

Assigned: Unassigned » jensimmons
Status: Active » Needs work

Honestly, I would propose not having a "special looking" page. Although it is awesome to make it look special, it tends to cause confusion rather than delight. Because at least in the last picture seem to be shifting away from anything looking closely to the actual site.

jensimmons’s picture

Yes, it will look different than the Bartik theme — why? Because this is going to be the maintenance page for almost every Drupal website out there (when something really bad happens, like the db server goes down). Only sites built by very smart people who setup their custom theme to be used as the maintenance theme will not get this page.

I'm so sick of seeing Garland show up when people's sites fail. I don't want Bartik to be the new "WTF, this isn't my site?"

I've given this a lot of thought. It's not random.

Bojhan’s picture

Sorry, I am a little confused. Why would Garland show up, when you have Batrik enabled? And what you are pointing out is exactly why it shouldn't be special - it should be close to the theme look.

Jeff Burnz’s picture

Because the theme you set for your site is stored in the variables table, but if db failure occurs then the maintenance theme is in code, which is the default theme unless set in settings.php - currently this is Garland, but is proposed to be Bartik, so yes, for db failure this is important. If you are really smart then you also set your site name in settings.php also so you dont get "Drupal" as the site name when the db fails ($conf['site_name'] = 'My Drupal site';)

Bojhan’s picture

Core is weird. Even if that is the case, this isn't the right place to slide a new core default in? Because if that is the case, why not just add it to Garland?

bleen’s picture

Bojhan: The proposal is to make Bartik, not garland the default theme for D7. If that happens, then Bartik will be the theme used by all d7 sites when their DBs are unavailable (unless the site owner has explicitly specified otherwise in settings.php)

Bojhan’s picture

Alright, I don't think its necessarily set at all that Batrik will take over the default spot and honestly that should not be used as an argument here.

Rather lets just argue the page itself, jen explained to me its only for the maintenance page I guess thats fine then.

jensimmons’s picture

Status: Needs work » Needs review
FileSize
6.35 KB

I made more changes. Put the display of the error messages after the note saying what's going on. Lightened the box around the message. Removed the logo (since it will often look terrible on white). Made spacing better.

Here's the patch.

jensimmons’s picture

Status: Needs review » Fixed

Oh, I also removed whole regions — removed featured, sidebars, etc.

Committed.

jensimmons’s picture

Screenshot of regular maintenance mode.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

aschiwi’s picture

Project: Bartik » Drupal core
Version: 7.x-1.x-dev » 7.x-dev
Component: Look and Feel » Bartik theme
Status: Closed (fixed) » Needs review
FileSize
1.29 KB
42.52 KB

I'm reopening this and moving it to Drupal project. I just used set this as my maintenance theme in default.settings.php before installing (That looks great btw). Here's a screenshot of what's wrong: http://drupal.org/files/issues/bartik_install.jpg (Warning messages show below success message, which states to check for messages _above_). I know this is not a regular use case, but here's a patch anyway.

Bojhan’s picture

Whats wrong with good news before bad news :P

I am somewhat concerned you are changing a default here though.

aschiwi’s picture

I just moved $messages from below $content to above $content. Unfortunately I don't know the theme enough to be able to tell why $messages is where it is. If someone does use it during installation (by setting maintenance_theme in default.settings.php) they will not see error messages during installation because some pages are pretty long. Plus when you're done Drupal tells you to check for the messages above, seems kinda strange to show up below =)

Yeah so I really don't know. I'm pretty sure close to nobody will actually do what I did, so I guess it doesn't matter. Just wanted to throw it out there and hate pointing something this small out without posting a patch.

bleen’s picture

hey .. what happened to the site name?? It's missing from the screenshot in #26

jensimmons’s picture

Re #29: There's an issue, with a patch to fix it, waiting for review at #850940: Maintenance Page site name and slogan has disappeared

Jeff Burnz’s picture

Is #26 still relevant, I just looked at the docs:

/**
 * A custom theme can be set for the offline page. This applies when the site
 * is explicitly set to maintenance mode through the administration page or when
 * the database is inactive due to an error. It can be set through the
 * 'maintenance_theme' key. The template file should also be copied into the
 * theme. It is located inside 'modules/system/maintenance-page.tpl.php'.
 * Note: This setting does not apply to installation and update pages.
 */
# $conf['maintenance_theme'] = 'bartik';

Can we mark this as fixed?

aschiwi’s picture

FileSize
40.82 KB

I just installed head and this is still there (see attached screenshot). Like I said, this is not such a likely case to be done but since Bartik is used as an example for Maintenance Theme in default.settings.php and this is a small change that is unlikely to break something, why not use the patch? $messages is only in the wrong place in maintenance-page.tpl.php.

Correct me if I'm wrong but as far as I can see, the description does not change anything since Bartik comes with a maintenance-page.tpl.php.

bleen’s picture

Status: Needs review » Needs work

@aschiwi ... the *much* more common case when this page will be seen is when a site's database is borked for whatever reason. With the patch in #26, that error will look like this:

Not so hot.

Comparatively, without the patch, you get this:
Dock

bleen’s picture

Status: Needs work » Needs review
FileSize
1.47 KB

This is a compromise I can live with...

Dock

bleen’s picture

FileSize
1.47 KB

slightly better spacing:

Dock

Jeff Burnz’s picture

Totally with bleen18 on this one, normally we don't support extreme edge cases - if we did we'd be still be waiting for D7 in 2012. The compromise is good, sorry I cannot RTBC this as its a design change and I think Bojhan and Jen should see it first. The code looks fine.

Bojhan’s picture

FileSize
87.09 KB

Are those the same? Currently using an iPad while my computer is being repaired :( so can't check

aschiwi’s picture

Ah, now I see why $messages is printed below, that makes sense. I'm totally okay with the compromise. The spacing is different, #messages has a margin-bottom of 15px and h1 has a margin-bottom of 0.5em. It makes a visual difference of 1px. I wouldn't really mind that difference.

bleen’s picture

FileSize
1.46 KB

Nice catch ... this patch has even better spacing:

Error | Drupal

aschiwi’s picture

Great, thanks!

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

Alright, looks good. I think it makes complete sense to have the error title above the error message. And the spacing is way better.

jensimmons’s picture

Status: Reviewed & tested by the community » Needs review

I don't have time to run this patch, so I'll just read the issue, look at the screenshots and comment:

I'm not sure what problem this fixes. Making Bartik work as an install screen is not something we are supported. (In fact, more and more, I'm really against the idea of Bartik as an admin theme at all. Seven is the admin theme, and it is *so* much better on so many levels. Bartik will never be as good...)

But that said, I'm not against this patch. As long as it's been well tested and we know:
a) the site name and slogan appear and look good
b) it works when the database server has failed
c) it works when the site is put into maintenance mode
d) it works for other cases

It seems we need a few more screenshots to make sure it's working all the time. I ask for these because these days I'm finding a LOT of bugs in Bartik that have been added when patches to fix small bits were not fully checked to see what other things were getting changed.

Bojhan’s picture

I don't see how this is related to the install screen is related to this issue? Either way, lets check for a,b,c - from my initial testing it seemed fine (the subtitle didn't change much). Since we can't really figure out d) unitil you encountered it as a bug - I am going to mark it back to RTBC, whenever the first three are throughly covered, all to keep an eye on releasing drupal :)

bleen’s picture

We may not like it but all core themes must work as the admin theme ... because users can make that choice in the GUI. Supporting Bartik during install is a bit wihy-washier, but I think this change is benign enough that since we can, we should...

This meets all the requirements in #42

MAINTENANCE MODE - all is well
Site under maintenance | The Site of The Century

WHEN THE DB FAILS - all is well
Error | Drupal

BARTIK DURING INSTALL - all is well
Database configuration | Drupal

Bojhan’s picture

Database isn't a fail, I thought that was expected, there is nothing we can do about that.

bleen’s picture

@45 ... I meant that this screenshot is what you get when the DB fails :)

Jeff Burnz’s picture

Is it just me but doesnt the blend of fonts, font sizes, font styles, font colors and spacing look all a bit messy?

I think bleen just means "a database failure" as in that's what it looks like by default without any Variable overrides such as $conf['site_slogan'] = 'Test Site Slogan';

Jeff Burnz’s picture

#39: bartik-maint-page.patch queued for re-testing.

espirates’s picture

I have a better idea, let site owners choose their own damn maintenance theme =)

Jeff Burnz’s picture

@49, they can, just as they have been able to since I can't remember when, certainly D5 & D6. Something has be default.

Jeff Burnz’s picture

#39: bartik-maint-page.patch queued for re-testing.

mattyoung’s picture

~

tim.plunkett’s picture

FileSize
1.41 KB

Reroll. Will actually review tomorrow.

tim.plunkett’s picture

FileSize
44.88 KB

The overlay link should not be shown.
Bartik's color.css should not be loaded (you can't see the site's title).

Patch (hopefully) coming.

jensimmons’s picture

Oh look at that. I just saw a #fail page on a demo site — and this new Skip to Main Content button. So I come here to post a screenshot, and Tim has beaten me to it. :P

screenshot of the maintenance page now, with new button

tim.plunkett’s picture

FileSize
1.34 KB

class="element-invisible element-focusable" was left out of maintenance-page.tpl.php when it was added to html.tpl.php.

Also, removing a redundant #header fixed the color of the page title.

mason@thecodingdesigner.com’s picture

Status: Needs review » Reviewed & tested by the community

Tested, rockin'.

bleen’s picture

RTBC++

tim.plunkett’s picture

FileSize
42.34 KB

Here's the after screenshot:

jensimmons’s picture

Status: Reviewed & tested by the community » Needs work

Ugh, that's not RTBC. I believe that it's full of great work, but it needs another pass for visual aesthetics. I'll do that as soon as I finish the comment issue. (If I ever do :P )

tim.plunkett’s picture

When I was in sprint mode, I just fixed the bugs. I put 0 time into aesthetics. I figured we could get the bug fix in first, and then reopen it for visuals. However, I just noticed that this issue is tagged as a feature request :)

Should I move my bug report and bug fix to a different issue? Or do you think it'll be fine combining it with whatever you come up with to make it look nice?

Jeff Burnz’s picture

Category: feature » task

Lets switch it to a task since its something that just has to be done. Fix it all in one hit - bugs + aesthetics in one patch.

jensimmons’s picture

Category: task » feature
Status: Needs work » Needs review
FileSize
2.32 KB

Ah ha! It looks extra janky because recently a patch went in to fix another bug, and it added a min-width to #page-wrapper. And we are narrowing the #page-wrapper with a width... and there was a collision. I added a min-width: 0 to the maintenance CSS, and the extra-janky disappears.

Screenshots:
BEFORE
before removing the min-width

AFTER
after removing the min-width

I lighted the border a bit. And I removed the printing of the highlighted region to the page (which wasn't showing up anyway, and shouldn't be on this page.)

I plan to re-read this whole queue again later... and see if this is IT. But, meanwhile, the "wtf is that" visual bug I was seeing in the screenshot of #59 is fixed.

Oh, and I should be clear, this patch builds on top of the patch in comment #56, so the latest work includes what Tim was doing.

jensimmons’s picture

This is what the page looks like now with the db missing:

a screenshot of what the page looks like with the db missing

jensimmons’s picture

FileSize
2.55 KB

Ok, I think it's totally weird to display the "site-name" when the db is offline, and there is no site name / logo coming from the db. What's "Drupal" doing there instead? Weird.... So I used CSS to make it go away. For screenreaders too.

Here's a screenshot of what that looks like:

 (headline)Error (bodytext)The webiste encountered an unexpected error. Please try again later. (in a warning box)PDOException; SQLSLATE blah blah blah geeky error message.

And the patch to do this.

Let's review this. Perhaps it could look visually more stunning. But it's pretty good. And seems to work better UX-wise than anything we've had before.

Jeff Burnz’s picture

"Drupal" as site name is set by Bartik itself:

template.php line 54:

$variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
tim.plunkett’s picture

Status: Needs review » Needs work
jensimmons’s picture

Hm. So what's needs work? What are you recommending we do Jeff / Tim?

tim.plunkett’s picture

Status: Needs work » Needs review

I mistook #66 as a suggestion to unset the title in template.php, which would theoretically be better than hiding it via CSS. However, because we only are hiding it when the db is offline, the CSS way is cleaner.

There are 1-2 whitespace things, but I'd rather get this in and then catch it in #889256: Clean up CSS coding style.

I'd say RTBC, but half of the patch is mine and I'd rather Jeff do it.

Jeff Burnz’s picture

Status: Needs review » Reviewed & tested by the community

Yes, I think its better to hide with CSS, at least then its probably easier to undo and make changes if someone wants to.

webchick’s picture

Category: feature » bug
Status: Reviewed & tested by the community » Needs work

Sorry, but that CSS hack is jankalicious. :\ Bartik needs to set the bar for best practices because we expect it to be copied/pasted/modified A LOT.

We're already preprocessing the maintenance page in template.php anyway, and from a couple seconds of grepping, it looks like there's a $variables['db_is_active'] you can check, and unset the site name if it's there. Make sure to leave a comment why you're doing that.

Also, this is no longer a feature request, from what I can tell.

tim.plunkett’s picture

Assigned: jensimmons » tim.plunkett

I'll rework this tomorrow.

jensimmons’s picture

jankalicious, yum!

yeah, I didn't mean to set this to feature request in #63. That was a mistake that I didn't notice.

Go Tim Go!

tim.plunkett’s picture

Assigned: tim.plunkett » Unassigned
Status: Needs work » Needs review
FileSize
2.98 KB

As I said earlier, that was so easy I feel lazy for not trying earlier.

Summary of changes to the maintenance page:

  • Adjust CSS selectors to properly color the site title
  • If the DB is offline, hide the site title
  • Add the correct classes to the skip-link
  • Remove the highlighted region because it is never used
  • Set a better color for the border
bleen’s picture

+++ themes/bartik/css/maintenance-page.css	18 Nov 2010 01:23:25 -0000
@@ -7,8 +7,9 @@ body.maintenance-page {
+  min-width: 0;

This patch looks great, except I dont understand this one line... why?

Powered by Dreditor.

tim.plunkett’s picture

It's an override of #page-wrapper {min-width: 960px;} from layout.css, to ensure that width: 800px; actually works.

bleen’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me:
Firefox

webchick’s picture

Status: Reviewed & tested by the community » Fixed

The greatest site ever? That must be a screenshot of drupal.org's maintenance page! :D

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

webchick’s picture