There seems to be an issue with the user/* pages like user/login and user/register etc.
They are always displayed using the maintenance-page.tpl.php so they don't have the blocks they should have (even when the site is not in offline mode).

The problem is that as far as I can tell (decent doco seems to be lacking in this area) maintenance mode and it's related MAINTENANCE_MODE constant is not the same thing as the site_offline variable, which is set at admin/settings/site-maintenance.

The MAINTENANCE_MODE constant is only used in relation to the install.php and update.php processes.
Outside of those the MAINTENANCE_MODE constant is not used.

Site maintenance mode, which is what you refer to in your post at http://adaptivethemes.com/how-to-theme-the-user-login-page-in-maintenanc... is related to variable_get('site_offline', 0); as opposed to MAINTENANCE_MODE.

In addition, the code only checks that arg(0) == user, which also includes user/register and user/password.

This patch addresses these 2 points.
Technically they could be in separate issues if you prefer but thy are both small and related.

CommentFileSizeAuthor
adaptivetheme-maintenance_page.patch1.99 KBrooby
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rooby’s picture

+++ adaptivetheme/template.php	14 Dec 2010 03:34:16 -0000
@@ -16,7 +16,7 @@ if (db_is_active()) {
@@ -30,4 +30,4 @@ if (db_is_active()) {

@@ -30,4 +30,4 @@ if (db_is_active()) {
   if (theme_get_setting('block_edit_links')) {
     drupal_add_css(drupal_get_path('theme', 'adaptivetheme') .'/css/edit-links.css', 'theme');
   }
-}
\ No newline at end of file
+}

Also, I have no idea why this is in here. I couldn't get rid of it.

Powered by Dreditor.

Jeff Burnz’s picture

Looking good, I like this patch a lot. Just running through some tests now and all is looking good, I'll probably commit this shortly.

Thanks a lot for revising and improving this, it really did need an overhaul (it was kinda hackish I know) so this is a vast improvement.

XiaN Vizjereij’s picture

Subscribing and working for me. I always wondered if that was intentional or a bug :D

Jeff Burnz’s picture

Version: 6.x-3.x-dev » 6.x-2.x-dev
Status: Active » Fixed

Committed to 6.x-3.x CVS

Jeff Burnz’s picture

Status: Fixed » Active

now backporting to 6.x-2.x to get this feature in there for those wanting to stay with the 2.x major version.

rooby’s picture

Cool, thanks.

Jeff Burnz’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Component: Code » CSS/HTML
Status: Active » Closed (fixed)