Ticket #2447 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Database Upgrade requires too many clicks

Reported by: markjaquith Assigned to: markjaquith
Priority: low Milestone: 2.2
Component: General Version: 2.1
Severity: normal Keywords: has-patch 2nd-opinion
Cc:

Description

Is there a good reason to require 3 clicks for database upgrades? We should be able to reduce this to one, or even zero!

Attachments

upgrade.diff (4.6 kB) - added by markjaquith on 03/28/06 10:15:13.
upgrade_rework.diff (2.5 kB) - added by markjaquith on 06/27/06 18:39:17.
Rework the upgrade copy and reduce 3 clicks to 2 clicks

Change History

03/28/06 10:15:13 changed by markjaquith

  • attachment upgrade.diff added.

03/28/06 10:17:57 changed by markjaquith

  • keywords set to has-patch 2nd-opinion.
  • owner changed from anonymous to markjaquith.
  • status changed from new to assigned.

First swing.

Goes directly to upgrade.php if an upgrade is needed, and starts the upgrade.

Upgrade status is shown, along with feedback on the database sync and upgrade_all(), which each return true/false (so a message can be returned).

Afterwards, the $goback link is displayed, but will be autofollowed after 10 seconds, which makes this a 0- or 1-click upgrade.

03/28/06 10:25:27 changed by MikeLittle

Doesn't this now make for fatal mistakes?

If I install the newest release in my live blog instead of my test blog, and try to access an admin page, I will have irretrievably changed my live blog. Of course I will have only backed up my test blog not my live one.

Before, I could realise my mistake and re-install the old code. Everything would be OK. With this change, all is lost.

03/28/06 10:54:57 changed by westi

+1 to redirecting instead of displaying the you must upgrade -1 to auto upgrading - as Mike says we could do more harm than good here! +1 to providing a link back to whence (sp?) you came to make it easy to go back where you where.

How about also adding a comment about - Have you backed up? / Optionally trigger wp-db-backup to do a backup now?

03/28/06 20:44:50 changed by markjaquith

If it isn't automatically done, we can't provide a "back" link. At least not the way it has been done until now. I'll think about ways we can do this.

Is people who accidentally upload a new WP version to their live server an actual case? Seems very "edge" to me. And anyway, any random person could run that upgrade, so it's not like having an additional click stops it.

Automatic database dump sounds very interesting, or at least a nag.

03/28/06 21:19:46 changed by westi

Thinking off the top of my head could a back link be provided by passing the info from upgrade.php toitself as a hidden form field work.

The first viewing will know the referrer and the second viewing can pull out where to redirect to from the form data?

03/30/06 06:36:29 changed by markjaquith

Yes, form value would work, but we would have to do the admin ref check on that second step, to prevent people from doing CSF.

06/27/06 18:39:17 changed by markjaquith

  • attachment upgrade_rework.diff added.

Rework the upgrade copy and reduce 3 clicks to 2 clicks

06/27/06 18:46:12 changed by markjaquith

  • version changed from 2.0.1 to 2.1.

upgrade_rework.diff does the following:

  1. Reduces clicks from 3 to 2 (the eliminated click is the one that gets you from the "you need to upgrade" die() to upgrade.php)
  2. Reworks the wording of the upgrade to be more professional
  3. Prevents the upgrade from being attempted if the database is up to date. wp_upgrade() was already protected, this just tells the user that the database is up to date, and omits the upgrade link.

To test, just manually increment your $wp_version in /wp-includes/version.php

10/04/06 21:45:59 changed by Nazgul

+1 for the reworked patch.

Although I would like the 'back' link to also be available when an upgrade isn't neccessary.

11/18/06 06:08:54 changed by matt

  • milestone changed from 2.1 to 2.2.

02/15/07 08:16:45 changed by markjaquith

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [4887]) Fewer clicks and better user experience for upgrades. fixes #2447