Make WordPress Core

Opened 19 years ago

Closed 18 years ago

#2447 closed enhancement (fixed)

Database Upgrade requires too many clicks

Reported by: markjaquith's profile markjaquith Owned by: markjaquith's profile markjaquith
Milestone: 2.2 Priority: low
Severity: normal Version: 2.1
Component: General Keywords: has-patch 2nd-opinion
Focuses: 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 (2)

upgrade.diff (4.6 KB) - added by markjaquith 19 years ago.
upgrade_rework.diff (2.5 KB) - added by markjaquith 19 years ago.
Rework the upgrade copy and reduce 3 clicks to 2 clicks

Download all attachments as: .zip

Change History (12)

@markjaquith
19 years ago

#1 @markjaquith
19 years ago

  • Keywords has-patch 2nd-opinion added
  • 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.

#2 @MikeLittle
19 years ago

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.

#3 @westi
19 years ago

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

#4 @markjaquith
19 years ago

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.

#5 @westi
19 years ago

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?

#6 @markjaquith
19 years ago

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.

@markjaquith
19 years ago

Rework the upgrade copy and reduce 3 clicks to 2 clicks

#7 @markjaquith
19 years ago

  • 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

#8 @Nazgul
19 years ago

+1 for the reworked patch.

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

#9 @matt
18 years ago

  • Milestone changed from 2.1 to 2.2

#10 @markjaquith
18 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Note: See TracTickets for help on using tickets.