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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

There 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.

tstoeckler’s picture

I had that first as well, but then I saw:

Each time a module is updated, it is important that update.php is run.

on admin/build/modules
and

Each time Drupal core or a contributed module or theme is updated, it is important that update.php is run.

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.

tobiasb’s picture

Each time Drupal core or a contributed module or theme is updated, it is important that update.php is run.

Thats 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

tstoeckler’s picture

To 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:

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 running the /update script/ to update your site to a newer version of Drupal or a contributed module

(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.

Dries’s picture

Status: Needs review » Needs work

People that can access this settings page can't always upgrade the site. I think we should probably add that link conditionally.

tstoeckler’s picture

Two 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?

deekayen’s picture

@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.

tstoeckler’s picture

Assigned: tstoeckler » Unassigned
afreeman’s picture

Assigned: Unassigned » afreeman
Status: Needs work » Needs review
FileSize
2.03 KB

link added conditionally.

tstoeckler’s picture

Wow, I did not know Drupal's Form API is that cool...

From #7:

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.

still stands...

afreeman’s picture

I've moved the conditional text to hook_help(). Does this work?

deekayen’s picture

Does l('update.php', 'update.php') work instead of creating a hard-coded HTML link?

Dries’s picture

These globals can be put on a single line.

tobiasb’s picture

And what is that ...return '<p>' . t('<p>If you are upgrad .... :D

Dries’s picture

Status: Needs review » Needs work

Updating status to reflect reality. ;-)

tobiasb’s picture

Status: Needs work » Needs review
FileSize
2.99 KB
Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD.

Status: Fixed » Closed (fixed)
Issue tags: -Usability, -ui-text

Automatically closed -- issue fixed for 2 weeks with no activity.