Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Screenshot.
Comment | File | Size | Author |
---|---|---|---|
#15 | theme.inc_1.diff | 1.03 KB | drumm |
#13 | errorhandling_base.patch | 825 bytes | wiz-1 |
#11 | errorhandling_1.patch | 8.75 KB | drumm |
#7 | errorhandling_0.patch | 8.44 KB | drumm |
#4 | errorhandling.patch | 8.47 KB | drumm |
Comments
Comment #1
drummComment #2
drummNew Druplicon which will need to replace misc/druplicon.png. The current file in that location is a giant flat druplicon which isn't used anywhere.
Comment #3
drummSome CSS
Comment #4
drummThis patch makes the database errors which occur when the database connection information is wrong or the database isn't up much nicer and more explanatory. To do this it adds a themeable function, theme_maintenance_page(), and a way to get Drupal running without a theme but the ability to execute themeable functions in the usual way. This means we can use the same code to give upgrade.php a nicer look in the future.
Comment #5
kbahey CreditAttribution: kbahey commentedI was about to do something similar on a less ambitious scale (mainly the connect function), because what we get now is ugly and looks unprofessional.
+1 from me for this. Great job!
Comment #6
gordon CreditAttribution: gordon commented+1, This looks great. Get this in and then we can do something with the upgrade.php system and it will look just great.
Comment #7
drummNew patch with a couple suggestions from chx.
$foo === NULL
is faster thanis_null($foo)
When testing/applying updates #2 and #3 of this issue need to be handled too.
Comment #8
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedI indeed like the patch! you have some perfectly helptexts which asure that people *must* be foulish when they do not know how to setup drupal the correct way. On that, a very, very fine patch..
Though, code-wise I have one nit-pick, which is propably not even a real issue. Only, I think it looks better:
. The username is
'. $url['user'] .'
and the database server is'. $url['host'] .'
.+
+- Are you sure you have the correct database name?
- Are you sure the database exists?
- Are you sure the username has permission to access the database?
+
+
+
+
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.
');
Wouldn't it be nicer (code-wise) todo:
Also would I encourage you to make a function theme_message($type, $message), like:
Which makes theme_placeholder() redundant and could be removed. Codesnippets could be handled in a more consistent way then we currently do (having a theme_placeholder() only is rediculous imo afterall).
Also this function could be used to remove the hardcoded HTML from the helptexts..
The code is untested and needs some love here-and-there. But, when it's done, I think we will create (codewise) more consistency than we currently have!
I look forward to see your idea's and hear your opinion about this..
Comment #9
drummThe theme_message() which stefan nagtegaal looks like it should be four separate themeable functions, one of which already exists. I think any such modifications are outside the scope of this patch.
I am nearly finished preparing a patch to update.php which uses this patch, but I can not post it until this patch is resolved.
Comment #10
Stefan Nagtegaal CreditAttribution: Stefan Nagtegaal commentedOkay, I think I have to agree with Neill in here.. If this patch hits the trunk, I'll make a new issue and rolls a patch for introducing new functions which should improve code-wise consistency..
Let me introduce you to:
";
}
function theme_text($message) {
return "
$message
";
}
Patches are soon to come in another issue, after this has hit the trunk..
Comment #11
drummUpdated patch using theme_placeholder() where appropriate.
Comment #12
Steven CreditAttribution: Steven commentedCommited to HEAD.
Comment #13
wiz-1 CreditAttribution: wiz-1 commentedBasically works nicely, but the function theme_maintenance_page doesn't set the BASE tag, which (at least in my setup with the site not at the root directory) fails to find the CSS files. The patch adds the same BASE tag as is present on normal pages (i.e., $base_url).
Comment #14
wiz-1 CreditAttribution: wiz-1 commentedThat was too quick, I have some more info. The current CVS code does not work when not accessing the start page, e.g. http://drupal/, but something at a deeper level (with search engine friendly URLs turned on) like http://drupal/user/. This case can easily happen with deep links from another site. With the patch attached to my previous post the properly formatted error page appears in this case, too.
Comment #15
drummGood catch, wiz.
drupal_get_html_head() will actually work here. not sure why I didn't use that before.
So this patch is an alternative solution to that lack of base problem.
Comment #16
Steven CreditAttribution: Steven commentedCommitted drumm's patch.
Comment #17
(not verified) CreditAttribution: commentedComment #18
drumm