Opened 19 years ago
Closed 18 years ago
#2447 closed enhancement (fixed)
Database Upgrade requires too many clicks
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
Change History (12)
#1
@
19 years ago
- Keywords has-patch 2nd-opinion added
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
#2
@
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
@
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
@
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
@
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
@
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.
#7
@
19 years ago
- Version changed from 2.0.1 to 2.1
upgrade_rework.diff
does the following:
- Reduces clicks from 3 to 2 (the eliminated click is the one that gets you from the "you need to upgrade"
die()
toupgrade.php
) - Reworks the wording of the upgrade to be more professional
- 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
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.