In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

View Revisions: Issue #65 All Revisions ] Back to Issue ]
Summary 0000065: Add "Maintenance Mode" option for Website
Revision 2011-12-23 16:18:08 by Dmitry
Additional Information There have been some cases when original described functionality (above in description field) will NOT work as expected.

For example when there is NO Database connection to the server which leads to NO way of getting/guess if it's a Maintenance mode or IP enabled or the way to show some message stored in DB itself.


1. Following variables will be added to top portion of DEBUG.PHP (after DBG_MAX_SQL_TIME):

define('MAINTENANCE_MODE_FRONT', 0); // Set to 1 for SOFT Maintenance mode, set to 2 for HARD Maintenance mode (no DB load)
define('MAINTENANCE_MODE_ADMIN', 0); // Set to 1 for SOFT Maintenance mode, set to 2 for HARD Maintenance mode (no DB load)
define('MAINTENANCE_MODE_IPS', ''); // Define IP addresses/hosts, which will be able to continue accessing website

There will be 2 separate settings - 1 for Front and 1 for Admin with single List of IPs to exclude from Maintenance. User can specify if he wants SOFT or HARD Maintenance mode enabled.

Soft Front - all users (except excluded IPs/hosts) are logged out and auto-redirected (301 code) to the specified Front-end template (setting below)

Soft Admin - all users (except excluded IPs/hosts) are logged out and auto-redirected (301 code) to the Admin Login page which will display the message (setting below) instead of the usual Login Form.

Hard Front / Admin - all users (except excluded IPs/hosts) are logged out and auto-redirected (301 code) to Static page that was generateed from template (setting below) - http://www.yourwebsite.com/system/maintenance.php

NOTES:

a. in case if there is NO DB Connection (Admin, Front, Cron) for ANY reason - user will be automatically redirected to http://www.yourwebsite.com/system/maintenance.php

b. Auto-redirect to 404 page if Soft Maint. template is missing or not specified, but Soft Mode has been enabled.

c. Still try redirecting to http://www.yourwebsite.com/system/maintenance.php even if page is missing.



2. Add 4 new Configuration variables under "Website Settings" (after Perform Exact Search):


MaintenanceMessageFront (Maintenance Message for Front End) - textarea

hint: This message will be shown on Front End when either Soft or Hard Maintenance modes are enabled via debug.php file or there no Database connection.
default: Website is currently undergoing the upgrades. Please come back shortly!

Thank you for your patience.


MaintenanceMessageAdmin (Maintenance Message for Admin) - textarea

hint: This message will be shown on Admin instead of Login form either when Soft or Hard Maintenance modes are enabled via debug.php file or there no Database connection.
default: Website is currently undergoing the upgrades. Please come back shortly!

Thank you for your patience.


SoftMaintenanceTemplate (Template for Soft Maintenance) - input field

hint: This template will be shown to the Front End users when Soft Maintenance mode is active.
default: maintenance


HardMaintenanceTemplate (Template for Hard Maintenance) - input field

hint: This template will be used to static HTML file under /system folder to be shown on Front-end or Admin when Hard Maintenance mode is active. Static page should be generated from specified here template by clicking "Generate" button.
default: maintenance
button: add "Generate Page" button next to the Input field with option to generate/regenerate the template. Don't perform generation if "HardMaintenanceTemplate" is empty or does NOT exists.


3. Add maintenance.tpl Template to Advanced and Default themes

Using default CMS design and using Front End MaintenanceMessageFront setting. It would be great if we can add nofollow="1" Meta settings for this template in the Head portion of the page
Revision 2011-12-18 23:30:35 by Dmitry
Additional Information There have been some cases when original described functionality (above in description field) will NOT work as expected.

For example when there is NO Database connection to the server which leads to NO way of getting/guess if it's a Maintenance mode or IP enabled or the way to show some message stored in DB itself.
Revision 2011-10-25 22:06:28 by Dmitry
Additional Information General Rules in "Maintenance Mode":


I. ENABLING "Maintenance Mode"
==============================
1. NEW "Maintenance Mode" section under Admin->Configuration->Advanced.

Will have options:

a. Enable Maintenance Mode (check-box)
b. EXCEPTIONS (textarea, IPs separated with semi-column ;)
c. TEMPLATE (input, to be shown on Front End, ie. no_permission)
d. SYSTEM message (textarea, to be displayed on Admin Login screen)


II Front End:
=============
1. END all Existing Sessions and LOGOUT users.

2. REDIRECT all New and Existing Users to "maintenance_template" (new TPL to be added under platform).

3. EXCEPTIONS are IPs specified in Admin Config settings (see above)


III Admin:
==========
1. END all Existing Sessions and LOGOUT users.

2. SHOW message on Login screen stating that site is in "Maintenance Mode" and display System Message (defined via Site Configuration in Admin)

3. EXCEPTIONS are IPs specified in Admin Config settings (see above)



MAINTENANCE_MODE
MAINTENANCE_MODE_IPS
Revision 2011-09-23 21:45:05 by Dmitry
Additional Information General Rules in "Maintenance Mode":


I. ENABLING "Maintenance Mode"
==============================
1. NEW "Maintenance Mode" section under Admin->Configuration->Advanced.

Will have options:

a. Enable Maintenance Mode (check-box)
b. EXCEPTIONS (textarea, IPs separated with semi-column ;)
c. TEMPLATE (input, to be shown on Front End, ie. no_permission)
d. SYSTEM message (textarea, to be displayed on Admin Login screen)


II Front End:
=============
1. END all Existing Sessions and LOGOUT users.

2. REDIRECT all New and Existing Users to "maintenance_template" (new TPL to be added under platform).

3. EXCEPTIONS are IPs specified in Admin Config settings (see above)


III Admin:
==========
1. END all Existing Sessions and LOGOUT users.

2. SHOW message on Login screen stating that site is in "Maintenance Mode" and display System Message (defined via Site Configuration in Admin)

3. EXCEPTIONS are IPs specified in Admin Config settings (see above)
Revision 2010-08-31 14:25:10 by Dmitry
Additional Information



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker