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!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000065 [In-Portal CMS] Front End feature request N/A 2009-06-12 06:08 2012-07-25 05:32
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.0-B1
Status closed Product Version 5.1.0 Target Version 5.2.0
Time EstimateNo estimate
Summary 0000065: Add "Maintenance Mode" option for Website
Description Add ability to put site in "Maintenance Mode". Useful, when site upgrade is made, when users could actually be browsing it (on both admin and front-end). Mode can be turned on by defining constant somewhere or by configuration variable.

When mode is on, then all sessions will be automatically ended and when user's visit site or try to login, then warning about maintenance mode will be shown and that they are welcome to visit site later.

Could actually specify IP of guy, who is performing maintenance so he could still perform login and browse site, but other users may not.

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)
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
Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-dev/asKqHKkJZxI/discussion
Change Log Message Added "maintenance mode" for website
Estimate Points 3
Attached Files patch file icon maintenance_mode_65.patch [^] (10,701 bytes) 2011-12-12 04:34 [Show Content]
patch file icon maintenance_mode_core_v2.patch [^] (28,020 bytes) 2011-12-28 12:03 [Show Content]
patch file icon maintenance_mode_themes_v2.patch [^] (23,762 bytes) 2011-12-28 12:03 [Show Content]
patch file icon maintenance_mode_core_v2-additions.patch [^] (1,203 bytes) 2011-12-29 16:32 [Show Content]
patch file icon maintenance_mode_themes_v2-additions.patch [^] (2,833 bytes) 2011-12-29 16:33 [Show Content]
png file icon GeneratePageButtonIssue.png [^] (224,485 bytes) 2011-12-29 16:51


patch file icon maintenance_mode_addon_fix.patch [^] (1,329 bytes) 2011-12-30 02:15 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0001186closed (5.2.0)alex Unable to change configuration on "Configuration -> Website -> Advanced" settings in Google Chrome 

-  Notes
User avatar (0000057)
Dmitry (manager)
2009-06-12 10:46

Any notes/comments on this?
User avatar (0000062)
alex (manager)
2009-06-12 12:28

Very good, exactly as I've proposed.
User avatar (0004242)
erik (manager)
2011-12-12 04:34

Patch attached - needs testing
User avatar (0004272)
Dmitry (manager)
2011-12-18 23:31

This feature needs some further discussion.
User avatar (0004329)
alex (manager)
2011-12-27 11:32

1. don't execute code from kApplication::Run & kApplication::Done methods on hard maintenance mode
2. execute kApplication::Done method as is, when maintenenace mode soft/disabled
3. kApplication::Run method does redirect to maintenace template all the time (when not already on it) in soft mode
4. kApplication::Done method in hard mode does redirect to HTML version of maintenance template
User avatar (0004337)
alex (manager)
2011-12-28 12:04

Done, but "/system/maintenance.html" isn't compiled during upgrade/clean install.
User avatar (0004338)
alex (manager)
2011-12-28 12:04

Will test all together later.
User avatar (0004339)
alex (manager)
2011-12-28 12:06

Fix committed to 5.2.x branch. Commit Message:

Fixes 0000065: Add "Maintenance Mode" option for Website
User avatar (0004355)
Dmitry (manager)
2011-12-29 16:34

Added 2 additional patches for Version 2 patch by Alex:

1. Use 302 redirects instead of 301 (described in task originally).
2. Add NO Debug to all Maintenance templates
3. Add HTTP auto-refresh every 2 mins with redirect to next_template in Soft mode and Home page in Hard mode. No need to have fancy JS there.
User avatar (0004356)
Dmitry (manager)
2011-12-29 16:51

New issue with Generate Page button has been discovered (see attch):

1. In Chrome browser, I always have some pre-filed value in Root Password - VERY annoying, by the way!

2. Now if try clicking Save at the Top I gett "Passwords do not match!" as you can see

3. But if I click new "Generate Page" button - it will do it's job + will save all values as we see them on the screen including some value for the password - most likely EMPTY or something.

The bottom line ROOT password will change without a need and it's a bug.

Proposing:
1. Disable Auto-complete / fill on the entire form (all fields if possible)
2. make sure Passwords match if Generate Page button Saves all values from the form.

if ($.browser.webkit) {
    $('input[name="password"]').attr('autocomplete', 'off');
}
User avatar (0004359)
alex (manager)
2011-12-30 02:17

Reminder sent to: Dmitry

Dmitry, you have "Use spaces as tabs" setting enabled in your PhpStorm installation resulting wrong formatting.

I've fixed that in the last patch I've uploaded (already commited) and $redirect_params variable wasn't ready.

Also why you haven't implemented redirect to last visited page in hard maintenance mode?
User avatar (0004370)
alex (manager)
2011-12-30 10:43

Was fixed in 0001186 task, since it was pure configuration screen problem unrelated to maintenance mode itself.
User avatar (0005008)
alex (manager)
2012-07-25 05:32

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r14950
Timestamp: 2011-12-30 02:18:37
Author: alex
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
1. fixes formatting and missing $redirect_params variable declaration
mod - /in-portal/branches/5.2.x/core/kernel/application.php Diff ] File ]
Themes :: Simple: 1.2.x r14949
Timestamp: 2011-12-29 16:37:43
Author: Dmitry
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
1. Add NO Debug to Maintenance template
2. Add HTTP auto-refresh every 2 mins with redirect to next_template in Soft mode and Home page in Hard mode
mod - /themes/simple/branches/1.2.x/maintenance.tpl Diff ] File ]
Themes :: Modern-Store: 1.0.x r14948
Timestamp: 2011-12-29 16:37:32
Author: Dmitry
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
1. Add NO Debug to Maintenance template
2. Add HTTP auto-refresh every 2 mins with redirect to next_template in Soft mode and Home page in Hard mode
mod - /themes/modern-store/branches/1.0.x/maintenance.tpl Diff ] File ]
Themes :: Default: 5.2.x r14947
Timestamp: 2011-12-29 16:37:12
Author: Dmitry
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
1. Add NO Debug to Maintenance template
2. Add HTTP auto-refresh every 2 mins with redirect to next_template in Soft mode and Home page in Hard mode
mod - /themes/default/branches/5.2.x/maintenance.tpl Diff ] File ]
Themes :: Advanced: 1.2.x r14946
Timestamp: 2011-12-29 16:36:44
Author: Dmitry
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
1. Add NO Debug to all Maintenance templates
2. Add HTTP auto-refresh every 2 mins with redirect to next_template in Soft mode and Home page in Hard mode
mod - /themes/advanced/branches/1.2.x/maintenance.tpl Diff ] File ]
In-Portal CMS: 5.2.x r14945
Timestamp: 2011-12-29 16:35:39
Author: Dmitry
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
1. Use 302 redirects instead of 301 as described in Task originally
mod - /in-portal/branches/5.2.x/core/kernel/application.php Diff ] File ]
In-Portal CMS: 5.2.x r14934
Timestamp: 2011-12-28 12:06:28
Author: alex
Details ] Diff ]
Fixes 0000065: Add "Maintenance Mode" option for Website
mod - /in-portal/branches/5.2.x/core/admin_templates/config/custom_variables.tpl Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/login.tpl Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/db/db_connection.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/db/db_load_balancer.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/managers/cache_manager.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/processors/main_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/startup.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/configuration/configuration_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/tools/debug_sample.php Diff ] File ]
Themes :: Simple: 1.2.x r14933
Timestamp: 2011-12-28 12:06:01
Author: alex
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
mod - /themes/simple/branches/1.2.x/_install/english.lang Diff ] File ]
mod - /themes/simple/branches/1.2.x/designs/default_design.des.tpl Diff ] File ]
add - /themes/simple/branches/1.2.x/maintenance.tpl File ]
Themes :: Modern-Store: 1.0.x r14932
Timestamp: 2011-12-28 12:05:53
Author: alex
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
mod - /themes/modern-store/branches/1.0.x/_install/english.lang Diff ] File ]
add - /themes/modern-store/branches/1.0.x/maintenance.tpl File ]
Themes :: Default: 5.2.x r14931
Timestamp: 2011-12-28 12:05:38
Author: alex
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
mod - /themes/default/branches/5.2.x/_install/english.lang Diff ] File ]
mod - /themes/default/branches/5.2.x/designs/default_design.des.tpl Diff ] File ]
add - /themes/default/branches/5.2.x/maintenance.tpl File ]
Themes :: Advanced: 1.2.x r14930
Timestamp: 2011-12-28 12:05:08
Author: alex
Details ] Diff ]
Bug 0000065: Add "Maintenance Mode" option for Website
mod - /themes/advanced/branches/1.2.x/_install/english.lang Diff ] File ]
add - /themes/advanced/branches/1.2.x/maintenance.tpl File ]
mod - /themes/advanced/branches/1.2.x/platform/designs/default_design.des.tpl Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:32 alex Note Added: 0005008
2012-07-25 05:32 alex Status resolved => closed
2011-12-30 10:43 alex Note Added: 0004370
2011-12-30 10:43 alex Status needs work => resolved
2011-12-30 10:43 alex Resolution reopened => fixed
2011-12-30 10:41 alex Relationship added related to 0001186
2011-12-30 02:18 alex Changeset attached 5.2.x r14950
2011-12-30 02:17 alex Issue Monitored: Dmitry
2011-12-30 02:17 alex Note Added: 0004359
2011-12-30 02:15 alex File Added: maintenance_mode_addon_fix.patch
2011-12-29 16:51 Dmitry Status needs feedback => needs work
2011-12-29 16:51 Dmitry File Added: GeneratePageButtonIssue.png
2011-12-29 16:51 Dmitry Note Added: 0004356
2011-12-29 16:51 Dmitry Status resolved => needs feedback
2011-12-29 16:51 Dmitry Resolution fixed => reopened
2011-12-29 16:37 Dmitry Changeset attached 1.2.x r14949
2011-12-29 16:37 Dmitry Changeset attached 1.0.x r14948
2011-12-29 16:37 Dmitry Changeset attached 5.2.x r14947
2011-12-29 16:36 Dmitry Changeset attached 1.2.x r14946
2011-12-29 16:35 Dmitry Changeset attached 5.2.x r14945
2011-12-29 16:34 Dmitry Note Added: 0004355
2011-12-29 16:33 Dmitry File Added: maintenance_mode_themes_v2-additions.patch
2011-12-29 16:32 Dmitry File Added: maintenance_mode_core_v2-additions.patch
2011-12-28 12:06 alex Note Added: 0004339
2011-12-28 12:06 alex Status reviewed and tested => resolved
2011-12-28 12:06 alex Fixed in Version => 5.2.0-B1
2011-12-28 12:06 alex Resolution open => fixed
2011-12-28 12:06 alex Assigned To !COMMUNITY => alex
2011-12-28 12:06 alex Changeset attached 5.2.x r14934
2011-12-28 12:06 alex Changeset attached 1.2.x r14933
2011-12-28 12:05 alex Changeset attached 1.0.x r14932
2011-12-28 12:05 alex Changeset attached 5.2.x r14931
2011-12-28 12:05 alex Changeset attached 1.2.x r14930
2011-12-28 12:04 alex Note Added: 0004338
2011-12-28 12:04 alex Status needs testing => reviewed and tested
2011-12-28 12:04 alex Note Added: 0004337
2011-12-28 12:04 alex Assigned To alex => !COMMUNITY
2011-12-28 12:04 alex Developer erik => alex
2011-12-28 12:04 alex Status needs work => needs testing
2011-12-28 12:03 alex File Added: maintenance_mode_themes_v2.patch
2011-12-28 12:03 alex File Added: maintenance_mode_core_v2.patch
2011-12-27 11:32 alex Note Added: 0004329
2011-12-26 22:30 Dmitry Status needs feedback => needs work
2011-12-23 16:18 Dmitry Additional Information Updated View Revisions
2011-12-18 23:31 Dmitry Note Added: 0004272
2011-12-18 23:30 Dmitry Reference => https://groups.google.com/d/topic/in-portal-dev/asKqHKkJZxI/discussion
2011-12-18 23:30 Dmitry Change Log Message => Added "maintenance mode" for website
2011-12-18 23:30 Dmitry Status needs testing => needs feedback
2011-12-18 23:30 Dmitry Summary Add "Maintenance Mode" option for website => Add "Maintenance Mode" option for Website
2011-12-18 23:30 Dmitry Description Updated View Revisions
2011-12-18 23:30 Dmitry Additional Information Updated View Revisions
2011-12-12 04:34 erik Time Estimate Removed 5 =>
2011-12-12 04:34 erik Note Added: 0004242
2011-12-12 04:34 erik Assigned To erik => alex
2011-12-12 04:34 erik Developer => erik
2011-12-12 04:34 erik Status needs work => needs testing
2011-12-12 04:34 erik File Added: maintenance_mode_65.patch
2011-12-09 10:20 Dmitry Assigned To alex => erik
2011-10-25 22:06 Dmitry Additional Information Updated View Revisions
2011-10-22 05:37 alex Estimate Points => 3
2011-09-27 06:24 alex Time Estimate Added 5
2011-09-23 21:45 Dmitry Note Deleted: 0000056
2011-09-23 21:45 Dmitry Target Version Icebox => 5.2.0
2011-09-23 21:45 Dmitry Additional Information Updated View Revisions
2010-08-31 14:25 alex Status active => needs work
2010-08-31 14:25 alex version => 5.1.0
2009-10-03 07:54 administrator Status reviewed and tested => active
2009-08-09 03:26 alex Status needs work => reviewed and tested
2009-06-12 12:28 alex Note Added: 0000062
2009-06-12 12:28 alex Status needs feedback => needs work
2009-06-12 10:46 Dmitry Note Added: 0000057
2009-06-12 10:46 Dmitry Assigned To => alex
2009-06-12 10:46 Dmitry Status active => needs feedback
2009-06-12 10:46 Dmitry Note Edited: 0000056 View Revisions
2009-06-12 10:45 Dmitry Note Edited: 0000056 View Revisions
2009-06-12 10:45 Dmitry Note Added: 0000056
2009-06-12 10:45 Dmitry Target Version => Icebox
2009-06-12 10:45 Dmitry Summary Add site service mode => Add "Maintenance Mode" option for website
2009-06-12 10:45 Dmitry Description Updated View Revisions
2009-06-12 06:08 alex New Issue



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

Powered by Mantis Bugtracker