I'm thrilled to test out the cvs-version. The Offline feature seems handy, but I'm embarassed to admit that I can't seem to access my site after activating the feature. I supposed that it was possible to log in by tha login page. Maybe a helpfull hint could be given in the settings page?

Comments

kbahey’s picture

You should be able to go to example.com/user/login (or example.com?q=user/login if you are not using clean URLs).

You can then log as an admin user.

Last I checked there was an unrelated bug that caused the page to not display the login fields. So, try using just "user" instead of "user/login". That should work.

Dries’s picture

It's still not working.

kbahey’s picture

Just to clarify: "/user" works fine, displays a login and accepts it if I am admin, and the site is offline.

"/user/login" still does not work.

I tested that with the latest CVS.

chx’s picture

I doubt that user/login _can_ be fixed the way user.module is right now. I do remember the author of site offline changing from user/login to user during form API update though can not remember the exact cause.

If user works then there is no problem, right? Maybe we should change the relevant tab to user and that's it?

kbahey’s picture

I suggested the same workaround to Dries: changing "user/login" to "user", but he had some reservation on this (seeing user info or user listing or something).

However, I do not see an issue, since the default maintenance themed page has no links to either (actually has no links at all!), so it may not be an issue?

Dries, would you reconsider this? I can patch it (exactly 5 characters removed!)

tangibre’s picture

I get the "Site offline"-page on http://example.com/user.
On the http://example.com/user/login I get an "Page not found" with three empty tabs (log in, register, request new password).
If I click on either I get "401 The web site is blocked by administrator"

Couldn't the "Site offline"-page have a subtle "Administrators go here"?

:-)

jvincher’s picture

Priority:Minor» Normal

I disagree with the assessment above that /user is working. As indicated by the last poster, /user gives the site offline page. Offline sites are at this point inaccessible.

kbahey’s picture

You are right, the reason it works for me is that I have this line in includes/menu.inc, function _menu_site_is_offline() to be:

      if (drupal_get_normal_path($_GET['q']) != 'user') {

Instead of:

      if (drupal_get_normal_path($_GET['q']) != 'user/login') {

Dries, please apply this as an official patch.

Dries’s picture

Status:Active» Fixed

Committed to HEAD.

jvincher’s picture

Status:Fixed» Active

This patch works but I run into another related problem.

When the site is offline and /user is selected and a non-admin user is loggin in, the site continues to respond offline. Selecting /user path generates /user/nonadminuser with the offline page displayed. I am unable to log the non-admin user off or, for that matter, log in as admin.

pegmonkey’s picture

Perhaps a note in the explanation under "administer/settings/site maintenance" that explains how to go about logging back in if the site admin inadvertantly logs out would be a good addition.

Popboard’s picture

http://drupalsite.com/?q=user should let you in.

pyewackett’s picture

Version:x.y.z» 5.0-beta2
Component:other» Garland theme

Thank you very much.....

I saved the maintance page to see how it would look I was unable to login to the admistration page after stuck to view the maintanence page.

But using http://www.mysite.com/?q=user

Let me login again, Thanks a lot saved me some hair as it had me pulling my hair out. :-)

ScoutBaker’s picture

Status:Active» Fixed

The people posting with the issue appear to have it resolved, and it is covered in the handbooks at http://drupal.org/node/56995.

Anonymous’s picture

Status:Fixed» Closed (fixed)

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

bahram3d’s picture

thanks man works for me