Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#74 | drupal-790556-75.patch | 2.98 KB | tim.plunkett |
#65 | drupal-790556-57.patch | 2.55 KB | jensimmons |
#63 | drupal-790556-56.patch | 2.32 KB | jensimmons |
#59 | 790556-after.png | 42.34 KB | tim.plunkett |
#56 | drupal-790556-55.patch | 1.34 KB | tim.plunkett |
Comments
Comment #1
jensimmons CreditAttribution: jensimmons commentedFor 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).
Comment #2
jensimmons CreditAttribution: jensimmons commentedComment #3
bleen CreditAttribution: bleen commentedthis 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?
Comment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedbleen, disable the database and see what happens.
Comment #5
bleen CreditAttribution: bleen commentedok ... 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
Comment #6
jensimmons CreditAttribution: jensimmons commentedYou 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.
Comment #7
JohnAlbinNope. 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.
Comment #8
Georg CreditAttribution: Georg commentedIf 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>
Comment #9
jensimmons CreditAttribution: jensimmons commented.
Comment #10
yoroy CreditAttribution: yoroy commented#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.
Comment #11
JohnAlbin@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. :-\
Comment #12
jensimmons CreditAttribution: jensimmons commentedBefore the changes I'm about to make:
Comment #13
jensimmons CreditAttribution: jensimmons commentedAfter:
Comment #14
jensimmons CreditAttribution: jensimmons commentedFirst round — committed, and fixed.
But now it needs another round of pretty. Assigning to myself.
Comment #15
Bojhan CreditAttribution: Bojhan commentedHonestly, 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.
Comment #16
jensimmons CreditAttribution: jensimmons commentedYes, 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.
Comment #17
Bojhan CreditAttribution: Bojhan commentedSorry, 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.
Comment #18
Jeff Burnz CreditAttribution: Jeff Burnz commentedBecause 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';)
Comment #19
Bojhan CreditAttribution: Bojhan commentedCore 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?
Comment #20
bleen CreditAttribution: bleen commentedBojhan: 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)
Comment #21
Bojhan CreditAttribution: Bojhan commentedAlright, 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.
Comment #22
jensimmons CreditAttribution: jensimmons commentedI 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.
Comment #23
jensimmons CreditAttribution: jensimmons commentedOh, I also removed whole regions — removed featured, sidebars, etc.
Committed.
Comment #24
jensimmons CreditAttribution: jensimmons commentedScreenshot of regular maintenance mode.
Comment #26
aschiwi CreditAttribution: aschiwi commentedI'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.
Comment #27
Bojhan CreditAttribution: Bojhan commentedWhats wrong with good news before bad news :P
I am somewhat concerned you are changing a default here though.
Comment #28
aschiwi CreditAttribution: aschiwi commentedI 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.
Comment #29
bleen CreditAttribution: bleen commentedhey .. what happened to the site name?? It's missing from the screenshot in #26
Comment #30
jensimmons CreditAttribution: jensimmons commentedRe #29: There's an issue, with a patch to fix it, waiting for review at #850940: Maintenance Page site name and slogan has disappeared
Comment #31
Jeff Burnz CreditAttribution: Jeff Burnz commentedIs #26 still relevant, I just looked at the docs:
Can we mark this as fixed?
Comment #32
aschiwi CreditAttribution: aschiwi commentedI 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.
Comment #33
bleen CreditAttribution: bleen commented@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:
Comment #34
bleen CreditAttribution: bleen commentedThis is a compromise I can live with...
Comment #35
bleen CreditAttribution: bleen commentedslightly better spacing:
Comment #36
Jeff Burnz CreditAttribution: Jeff Burnz commentedTotally 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.
Comment #37
Bojhan CreditAttribution: Bojhan commentedAre those the same? Currently using an iPad while my computer is being repaired :( so can't check
Comment #38
aschiwi CreditAttribution: aschiwi commentedAh, 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.Comment #39
bleen CreditAttribution: bleen commentedNice catch ... this patch has even better spacing:
Comment #40
aschiwi CreditAttribution: aschiwi commentedGreat, thanks!
Comment #41
Bojhan CreditAttribution: Bojhan commentedAlright, looks good. I think it makes complete sense to have the error title above the error message. And the spacing is way better.
Comment #42
jensimmons CreditAttribution: jensimmons commentedI 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.
Comment #43
Bojhan CreditAttribution: Bojhan commentedI 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 :)
Comment #44
bleen CreditAttribution: bleen commentedWe 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
WHEN THE DB FAILS - all is well
BARTIK DURING INSTALL - all is well
Comment #45
Bojhan CreditAttribution: Bojhan commentedDatabase isn't a fail, I thought that was expected, there is nothing we can do about that.
Comment #46
bleen CreditAttribution: bleen commented@45 ... I meant that this screenshot is what you get when the DB fails :)
Comment #47
Jeff Burnz CreditAttribution: Jeff Burnz commentedIs 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';
Comment #48
Jeff Burnz CreditAttribution: Jeff Burnz commented#39: bartik-maint-page.patch queued for re-testing.
Comment #49
espirates CreditAttribution: espirates commentedI have a better idea, let site owners choose their own damn maintenance theme =)
Comment #50
Jeff Burnz CreditAttribution: Jeff Burnz commented@49, they can, just as they have been able to since I can't remember when, certainly D5 & D6. Something has be default.
Comment #51
Jeff Burnz CreditAttribution: Jeff Burnz commented#39: bartik-maint-page.patch queued for re-testing.
Comment #52
mattyoung CreditAttribution: mattyoung commented~
Comment #53
tim.plunkettReroll. Will actually review tomorrow.
Comment #54
tim.plunkettThe 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.
Comment #55
jensimmons CreditAttribution: jensimmons commentedOh 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
Comment #56
tim.plunkettclass="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.Comment #57
mason@thecodingdesigner.com CreditAttribution: mason@thecodingdesigner.com commentedTested, rockin'.
Comment #58
bleen CreditAttribution: bleen commentedRTBC++
Comment #59
tim.plunkettHere's the after screenshot:
Comment #60
jensimmons CreditAttribution: jensimmons commentedUgh, 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 )
Comment #61
tim.plunkettWhen 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?
Comment #62
Jeff Burnz CreditAttribution: Jeff Burnz commentedLets 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.
Comment #63
jensimmons CreditAttribution: jensimmons commentedAh 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
AFTER
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.
Comment #64
jensimmons CreditAttribution: jensimmons commentedThis is what the page looks like now with the db missing:
Comment #65
jensimmons CreditAttribution: jensimmons commentedOk, 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:
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.
Comment #66
Jeff Burnz CreditAttribution: Jeff Burnz commented"Drupal" as site name is set by Bartik itself:
template.php line 54:
Comment #67
tim.plunkettComment #68
jensimmons CreditAttribution: jensimmons commentedHm. So what's needs work? What are you recommending we do Jeff / Tim?
Comment #69
tim.plunkettI 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.
Comment #70
Jeff Burnz CreditAttribution: Jeff Burnz commentedYes, I think its better to hide with CSS, at least then its probably easier to undo and make changes if someone wants to.
Comment #71
webchickSorry, 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.
Comment #72
tim.plunkettI'll rework this tomorrow.
Comment #73
jensimmons CreditAttribution: jensimmons commentedjankalicious, 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!
Comment #74
tim.plunkettAs I said earlier, that was so easy I feel lazy for not trying earlier.
Summary of changes to the maintenance page:
Comment #75
bleen CreditAttribution: bleen commentedThis patch looks great, except I dont understand this one line... why?
Powered by Dreditor.
Comment #76
tim.plunkettIt's an override of
#page-wrapper {min-width: 960px;}
from layout.css, to ensure thatwidth: 800px;
actually works.Comment #77
bleen CreditAttribution: bleen commentedLooks good to me:
Comment #78
webchickThe greatest site ever? That must be a screenshot of drupal.org's maintenance page! :D
Committed to HEAD. Thanks!
Comment #80
webchickNote that this introduced a regression at #1334344: During update, Bartik throws an error that $site_name is not defined.