Re: Errors....
Reply #15 –
I'd like to see maybe a place in General Settings, where the admin can insert an email address, or a URL, to be pasted onto the error pages, as a "Contact us if you see this page" kind of thing.
Should work, as I know some fields do not get added to the database.
Like template edit settings.
Re: Errors....
Reply #21 –
I think he means the page where admin can modify any theme template file (which we already have).
The idea could be, create a file for it in default theme folder, move the html page code in Errors.php to that file, include / display the page on database connection error, the file can be modify via the above said page.
Does it make sense?
Re: Errors....
Reply #22 –
Ok, let me try to explain it another way so that it may be becomes a little more clear:
0) all the data related to the theme (paths, urls, settings) are stored in the database,
1) we are talking about the case Elk is not able to connect to the database,
2) if Elk cannot connect to the db it cannot (reliably) know where the theme is (because this data is stored in the database, see point 0),
3) if Elk cannot (reliably) know where the theme is, it cannot load a theme file.
From that we find out that:
1) the html is in Errors.php because in that case Elk cannot be sure where the files are (please, remember Elk allows to store themes in arbitrary directories),
2) we cannot more the HTML code to a template file because in case of database error we are not sure where the themes directory is (the paths are stored in the database!).
There is a possible mid/long term solution to this, but I don't want to mention it here and now because I know it will derail the topic even more, so let's do what we can with what we have.
We know in most of the cases the default theme is under forum/themes/default, so (as I said two days ago) Elk can probe and see if the theme is actually there, if it is there, it can try to use it (because the theme may be in the expected place, but assets may be served from another url nothing is completely sure in this case), otherwise dull empty screen.
At the moment, this is the only possible workaround.
About additional links/emails/whatever, if I'm not wrong, in case of database errors Elk already sends out an email to the "forum email" (the one set in server config IIRC), what is possible is to let admins specify multiple email addresses there. Anything more would require more settings stored in Settings.php (that is something I would avoid if at all possible) or a working database connection (that in the case at hands we don't have).