Page 1 of 3

ADD Maintenance to CMSimple_XH 1.6.5

Posted: Wed Oct 22, 2014 10:35 am
by twc
Hello

good idea ?
ADD Maintenance plugin to CMSimple_XH 1.6.5
http://fiberdordrecht.nl/maintenance.rar

[ external image ]

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Thu Oct 23, 2014 12:12 pm
by cmb
twc wrote:good idea ?
ADD Maintenance plugin to CMSimple_XH 1.6.5
I'm not sure. Anyway, I've put it on the roadmap for voting.

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Wed Dec 10, 2014 9:13 pm
by cmb
Some thoughts. This kind of maintenance mode is not sufficient during updates (core, plugins, templates, etc.), but nonetheless it could be useful during editing the site (OTOH one could always hide or even unpublish a page he's working on temporarily). Having a maintenance mode in the core might be even better than having it as a plugin, although I can't see any real advantage. Do I overlook something?

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Thu Dec 11, 2014 4:23 pm
by svasti
Going to a website and seeing only the "maintenance notice" is kind of frustating. People might prefer seeing a website in progress.

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Thu Dec 11, 2014 6:51 pm
by twc
svasti wrote:Going to a website and seeing only the "maintenance notice" is kind of frustating. People might prefer seeing a website in progress.
:lol: i have seen so many maintenance notice on websites and companys.

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Thu Dec 11, 2014 7:32 pm
by Ulrich
Thats the worst case

"Maintenance mode is enabled"

If I would see such a notice on a website - I would leave immediately and never return..........

Thats the worst you can do: either have the complete website in Maintenance mode or have that typical "This Website is under construction logo" or "This page is under construction"

If a webmaster is not able to publish a website with content he should do something else -

*_xh offers the option of preparing a page wich is not visible in the menu nor visible as page itself.
So the webpage can start with just a start page and grow page by page -but get away from these maintenace modes.
If an update/upgrade ist necessary the site will temporarely not be reached, an error will be display (error 500 eg) - this happens even at well known sites - so the user will definately return ....

But displaying some kind of Maintenance Notice is just a bad habbit - left over from the beginning of the internet.

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Thu Dec 11, 2014 8:41 pm
by svasti
May be better to have a plugin maintenance_XH for those, who want or need the maintenance mode. One could use the new function XH_emergencyTemplate() and exchange the content with the maintenance notice.

Another possibility is to upload an index.html file with the maintenance notice into our base folder. Usually the index.html is read before the index.php (depends on the server settings), so if you have an index.html, people will not see your site, except they use http://yoursitename.xxx/index.php
I used this possibility for websites in progress, where the future webmaster wants to see how the website looks without making it public.

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Thu Dec 11, 2014 9:31 pm
by cmb
Ulrich wrote:If an update/upgrade ist necessary the site will temporarely not be reached, an error will be display (error 500 eg) - this happens even at well known sites - so the user will definately return ....
Very good point. That is particularly important for bots which would otherwise index the maintenance (or whatever) message. The preferred status is 503 Service Unavailable, however.
svasti wrote:Another possibility is to upload an index.html file with the maintenance notice into our base folder.
When I have to make upgrades I temporarily replace index.php with the following:

Code: Select all

<?php

header('HTTP/1.0 503 Service Unavailable');
header('Content-Type: text/html;charset=UTF-8');

?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Maintenance</title>
<style type="text/css">
body {
    text-align: center;
    font-size: 24pt;
}
#footer {
    padding-top: 3em;
    font-family: Arial,sans-serif;
    font-size: 8pt;
}
</style>
</head>
<body>
<p>Due to maintenance this website is temporarily not available.</p>
<img src="./under_construction.png" width="256" height="256" alt="Maintenance">
<p>Please try again later.</p>
</body>
</html>
svasti wrote:I used this possibility for websites in progress, where the future webmaster wants to see how the website looks without making it public.
An alternative is to enforce authentication for visiting the website.

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Fri Dec 12, 2014 11:23 am
by Holger
Ulrich wrote:If an update/upgrade ist necessary the site will temporarely not be reached, an error will be display (error 500 eg) - this happens even at well known sites - so the user will definately return ...
If the server returns Error 500, something goes wrong on that page. Exactly that could happen if you update your installation without turning it offline...
Ulrich wrote:But displaying some kind of Maintenance Notice is just a bad habbit - left over from the beginning of the internet.
The plugin (linked in the first post) I've coded years ago is in most cases useless. It does not send the appropriate header (503) and with a click on the login-link, the user can see a maybe broken website / template with the login form.
But a real maintenance mode is not useless at all. If you have a website with user generated content it's more than a good idea to switch the installation really offline, while installing updates.
But that's impossible with a plugin at all.
The only safe way is to replace index.php like Christoph mentioned.

I would welcome to have a real maintenance mode in the core, maybe controlled by a file in the download folder, as it's done with the debug-mode.
And, of course, there must still remain the possibility to log in...

PS: BTW, what happened to this proposal: http://cmsimpleforum.com/viewtopic.php?f=29&t=6262 ?

Re: ADD Maintenance to CMSimple_XH 1.6.5

Posted: Fri Dec 12, 2014 2:31 pm
by svasti
One could put a maintenance mode into the index.php. However controlling it via a file in the download folder would mean controlling it via ftp. In this case one could just as well change something in the index.php. And since maintenance mode seems to be wanted mainly when people are doing some ftp uploading, why not prepare some code in the index.php with the notice "to activate maintenance mode uncomment the following code line".