Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plain maintenance mode page #5789

Open
MorrisJobke opened this issue Jul 19, 2017 · 21 comments
Open

Plain maintenance mode page #5789

MorrisJobke opened this issue Jul 19, 2017 · 21 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: theming

Comments

@MorrisJobke
Copy link
Member

The maintenance mode page is currently in Nextcloud branding and doesn't respect the theming app or themes, because nothing of this is loaded during that. We should maybe update the maintenance page to a plain unbranded page that would not contain any Nextcloud branding, but a generic branding to not interfere with branded versions of Nextcloud.

Should we maybe simply load the content from a static HTML file instead to allow easy customisation even if nothing else is loaded?

@nextcloud/designers Do you have an idea for this?

cc @juliushaertl @rullzer

@jancborchardt
Copy link
Member

jancborchardt commented Aug 12, 2017

Could we not also feed the stuff from the theming app into there? Even if it’s maintenance mode, the page should look nice. Otherwise people’s frustration about an unexpected error is amplified by the ugly look of the page.

(At the very least, the page should stay the same if not themed, and themed instances could deactivate the styles or so.)

@MorrisJobke
Copy link
Member Author

The problem is that we don't know if it is themed because the database could have changed and we try to access columns with new names, but old DB layout.

@jancborchardt
Copy link
Member

Don’t we get that from the config.php?

@MorrisJobke
Copy link
Member Author

No - it is an app ;) the theming app ;)

@juliushaertl
Copy link
Member

@rullzer Is the new AppData available without accessing to the database? Because then we maybe could just cache the themed maintenance page there.

@rullzer
Copy link
Member

rullzer commented Sep 21, 2017

Nope needs the db

@Django-BOfH
Copy link

As I've MorrisJobke understood, it is, because no app is loaded for this time and thus also the app data and the theming app is not available. Nevertheless there is the idea of a plain maintenance mode page.

Okay, are there any more specific plans as to when this function will be available?

Currently a hardcoded page is loaded from the filespace to display the Maitenance page, right?

Alternatively I could imagine the following:

As soon as the color and/or slogan exactly this hard-coded page is written individually into the filespace with the updated changes and then the file is signed. In a maintenance case exactly this individual page can be loaded and displayed.

So there would be no excited questions from users who are currently calling excitedly and asking if we have been compromised or hacked, since the site suddenly looks completely different (in colour) and the slogan / footnote also indicates that something can't be right.

@MorrisJobke
Copy link
Member Author

MorrisJobke commented Apr 5, 2018

As soon as the color and/or slogan exactly this hard-coded page is written individually into the filespace with the updated changes and then the file is signed. In a maintenance case exactly this individual page can be loaded and displayed.

Sadly we can't write to a random location and thus need to write to the data dir. And writing to the data dir is not possible, because we need the DB to fetch the info that is needed to read from any possible data dir implementation. :/

@Django-BOfH
Copy link

Django-BOfH commented Apr 5, 2018 via email

@MorrisJobke
Copy link
Member Author

No further details are available as of now.

@Django-BOfH
Copy link

Django-BOfH commented Apr 6, 2018 via email

@MorrisJobke
Copy link
Member Author

Well, the best thing will be, I build my own static error page, which I
have delivered by the web server in maintenance-mode.

Yes. This sounds like a decent plan and makes also sense. Just one config option inside Nextcloud with the path to the file and then we serve only this as HTML and are done. For styles you need to inline CSS, but this should be fine for the maintenance page itself.

@rullzer @jancborchardt @skjnldsv Should we do it like that?

@jancborchardt
Copy link
Member

I doubt many people will go through the trouble of customizing that as it's seen so rarely (ideally never).

A config option (not in the interface) would be the most here.

In normal cases, the maintenance mode page having regular Nextcloud look is not really that big of an issue. (Of course if it would be possible to automatize, we should – but as you said it's not.)

@juliushaertl
Copy link
Member

I doubt many people will go through the trouble of customizing that as it's seen so rarely (ideally never).

Well, i remember there were already quite some issues reported for that. So people want their maintenance page themed as well. 😉

Yes. This sounds like a decent plan and makes also sense. Just one config option inside Nextcloud with the path to the file and then we serve only this as HTML and are done. For styles you need to inline CSS, but this should be fine for the maintenance page itself.

We could also just go for the theme folder and look for existence of a special maintenance template file there. As far as I remember, we should be able to do that without the need of having the database available.

@juliushaertl
Copy link
Member

I just gave it a try and a custom theme can already be used to style the maintenance page by adding

  • themes/example/css/guest.css
  • themes/example/templates/update.user.php

So we already have the possibility to theme this page for advanced users, not sure if we need anything else.

@MorrisJobke
Copy link
Member Author

I just gave it a try and a custom theme can already be used to style the maintenance page by adding

themes/example/css/guest.css
themes/example/templates/update.user.php
So we already have the possibility to theme this page for advanced users, not sure if we need anything else.

The idea here was to get people off the themes, because they often broke more stuff than helped to fix issues.

@hanserasmus
Copy link

I think the theme itself is not that big a deal. Reverting to the standard Nextcloud theme during Maintenance is fine imho. However, being able to add a line to config.php (it could/should be static string) with a custom message would go a long way with any admin trying to communicate maintenance downtime with their users.
Something along the lines of

maintenance_message => 'We are down for planned maintenance from X to Y. Sorry for any inconvenience caused'

In real world scenarios this communication is sent out by email, and in big enterprises with many systems, you might as well send this message by carrier pigeon or telegram. People ignore and delete it, and then panic when the service is not available. Having a transparent message displayed with facts about how long the service will be down, will go a VERY long way.

@MorrisJobke any idea if this possible? And if so, any further development on the stuff mentioned in this ticket so far?

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Nov 30, 2018
@BrookeDot
Copy link
Member

BrookeDot commented Jan 10, 2019

Coming into this sorta late, but I'm wondering if in combination of adding the maintenance_message a file check could be made prior to loading the maintenance template. Excuse the Pseudocode code but something like

if (file_exists( 'maintenance-custom.php)) {
   //load custom maintenance template
} else {
    //nothing to see here, load Nextcloud branded page
}

Users could then either copy the default file to root or a template could be provided.

@skjnldsv
Copy link
Member

skjnldsv commented May 2, 2019

@juliushaertl we could also have an offline config file that reflect the exact data theming is using? A file that the theming app updates alongside the db?

@MorrisJobke
Copy link
Member Author

@juliushaertl we could also have an offline config file that reflect the exact data theming is using? A file that the theming app updates alongside the db?

Keep clustered environments in mind, where this request is coming from typically.

@skjnldsv skjnldsv added the 1. to develop Accepted and waiting to be taken care of label Jun 17, 2019
@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of and removed 1. to develop Accepted and waiting to be taken care of labels May 26, 2021
@elhananjair

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: theming
Projects
None yet
Development

No branches or pull requests