Hi,
I've found problems when the module require login is activated and I've put the site offline, because the module always redirect you to the login page, and the site offline page will never be seen.
I found this problem when I was preparing my site to put it in the live environment, because I want to maintain the require login functionality, but also to show the site offline page.
To solve this problem adding an if statement before all checking the variable "site_offline", and if it's 0 (it means the site if offline) i do nothing.
You've attached the required patch to apply it
I hope you include it to the next module release
Comments
Comment #1
ericpalace commentedTake care about this change that is not compatible with the domain access module activated.
If you need to do this functionality with more than you domain, you must change the code:
to
The way to check variables with the domain access module activated is different if not
Cheers!
Comment #2
Jeffrey C. commented@ericpalace, does your solution work with Domain Access module not installed? Please advise so I can commit this and make a new release.
Comment #3
Reuben Unruh commentedThe original patch is almost working for me in Drupal 7 along with this patch. This variable is 'maintenance_mode' instead of 'site_offline' in D7.
domain_conf_variable_get() is part of Domain Access so the changes in the first comment will not work unless this module is enabled.
Comment #4
Reuben Unruh commentedHere is the D7 version of the patch:
Comment #6
Jeffrey C. commentedActually the patch doesn't work - in Drupal 7, maintenance mode is controlled by variable site_offline instead of maintenance_mode. I've fixed the bug manually. Thank you all for the contribution!