If you follow the steps of updating your Drupal sites, as you should, you start by putting your site into maintenance mode.
Step 2 is visiting update.php. Therefore, when you are on admin/settings/maintenance-mode chances are you are going to visit update.php next. But there is no link to update.php from admin/settings/maintenance-mode.
Attached patch changes the description of the form on that page to include a link to update.php so that lazy people like me, can just click it, instead of having to type it into your browser every time.
The text changes from:
When set to "Online", all visitors will be able to browse your site normally. When set to "Offline", only users with the "administer site configuration" permission will be able to access your site to perform maintenance; all other visitors will see the site offline message configured below. Authorized users can log in during "Offline" mode directly via the user login page.
To:
When set to "Online", all visitors will be able to browse your site normally. When set to "Offline", only users with the "administer site configuration" permission will be able to access your site to perform maintenance tasks, such as visiting update.php; all other visitors will see the site offline message configured below. Authorized users can log in during "Offline" mode directly via the user login page.
Comment | File | Size | Author |
---|---|---|---|
#16 | maintenance-update-link_05.patch | 2.99 KB | tobiasb |
#11 | maintenance-update-link_04.patch | 1.51 KB | afreeman |
#9 | maintenance-update-link_03.patch | 2.03 KB | afreeman |
#4 | maintenance-update-link_02.patch | 1.83 KB | tstoeckler |
maintenance-update-link.patch | 1.75 KB | tstoeckler | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedThere are people that will want to upgrade, without knowing about update.php. So instead of writing "visiting update.php", I'd write "upgrading your site to a new version of Drupal" or something along those lines.
Comment #2
tstoecklerI had that first as well, but then I saw:
on admin/build/modules
and
on admin/reports/updates.
But since I totally agree with Dries, I'd say those other ones are usability issues and will reroll this one, with what you said in #1.
Comment #3
tobiasbThats not true, only when a module needs an db-update.
Ever time you update an component for Drupal and this needs a database update, you will be inform on [link]status report[/link] and then you must run [Link]update.php[/link] (icon red=run update, icon green= all is ok) .
sorry for my english grammar:D
Comment #4
tstoecklerTo add to that: Between a minor version upgrade of Drupal you NEVER have to run update.php because the API (and with it the DB tables) is consistent (right?).
BUT: More importantly, that is a different issue (@Razorraser: be sure to open one!). This issue is about adding a link to admin/settings/maintenance-mode which you should always visit when you run update.php.
Updated the patch. It now says:
(The /slashes/ show where the link is)
I know that's a bit verbose, but in Dries' proposal (#1), I did not know where to put the link.
Comment #5
Dries CreditAttribution: Dries commentedPeople that can access this settings page can't always upgrade the site. I think we should probably add that link conditionally.
Comment #6
tstoecklerTwo questions:
1. (To anyone): How does this work, adding a link conditionally in a form's description? I tried figuring it out, but got stumped. Any hints/directions?
2. (To Dries): What's your view on the other references of update.php in Drupal help text. Should we take care of those in a similar fashion once this is settled?
Comment #7
deekayen CreditAttribution: deekayen commented@tstoeckler: It is undesired, but there have been update functions to run between minor versions.
Putting it in the field description is awkward. Maybe it would be better in the appropriate hook_help(). Then you could elaborate on why the link is even there.
I must be out of touch... I thought only UID 1 could run update.php unless it was unlocked in settings.php.
Comment #8
tstoecklerComment #9
afreeman CreditAttribution: afreeman commentedlink added conditionally.
Comment #10
tstoecklerWow, I did not know Drupal's Form API is that cool...
From #7:
still stands...
Comment #11
afreeman CreditAttribution: afreeman commentedI've moved the conditional text to hook_help(). Does this work?
Comment #12
deekayen CreditAttribution: deekayen commentedDoes l('update.php', 'update.php') work instead of creating a hard-coded HTML link?
Comment #13
Dries CreditAttribution: Dries commentedThese globals can be put on a single line.
Comment #14
tobiasbAnd what is that
...return '<p>' . t('<p>If you are upgrad ...
. :DComment #15
Dries CreditAttribution: Dries commentedUpdating status to reflect reality. ;-)
Comment #16
tobiasbComment #17
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.