Make WordPress Core

Opened 15 years ago

Last modified 5 years ago

#7965 new enhancement

Database upgrade complete message should be an admin notice

Reported by: westi's profile westi Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch needs-refresh
Focuses: ui, administration Cc:

Description

When a database upgrade is complete we should just take you to the page you wanted to see and should an upgrade_complete admin notice instead of requiring another button click

Attachments (1)

7965.diff (5.9 KB) - added by nacin 13 years ago.

Download all attachments as: .zip

Change History (13)

#1 @ryan
15 years ago

The db_upgraded option that is checked in admin.php makes this easier.

#2 @ryan
15 years ago

  • Component changed from Administration to Upgrade/Install
  • Owner anonymous deleted
  • Type changed from defect (bug) to enhancement

#3 @Denis-de-Bernardy
15 years ago

  • Milestone changed from 2.8 to Future Release

#4 @johnbillion
14 years ago

  • Cc johnbillion@… added

#5 @nacin
13 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Future Release to 3.3

After some discussion, we don't actually need any more UI here at all. Database upgrades are never intensive anymore, and if they ever would be for some major migration in the future, we can either add code back or do it in some async fashion. And they're safe.

Attached patch neuters upgrade.php and moves relevant upgrade code to admin.php. The upgrade.php file can't strictly be deleted since multisite still uses it.

At some point it would be nice to not be calling delete_site_transient() on ever multisite call, and to eventually just kill off this file.

@nacin
13 years ago

#6 @dd32
13 years ago

Patch seems to work for me, I've only tested on a Single site instance however.

The only things which it doesn't catch, is

  • Notifying the user that an upgrade took place
  • Notifying the user of any errors which occurred during the upgrade

Occasionally with WP_DEBUG enabled, I'll see Database errors (ie. Index already defined) that sort of thing is going to be missed with this patch added. Whilst it's not going to be an issue for small sites, it could theoretically cause an issue for some.

I feel like using the Settings Notice API for the latter part somehow..

#7 @nacin
13 years ago

Since we normally trigger it without showing error messages, I'm not sure capturing these is worth the extra development.

#8 @nacin
13 years ago

Looks like the patch might need a tweak in the multisite branch. Just a matter of unifying it in terms of require's, etc.

#9 @dd32
13 years ago

Since we normally trigger it without showing error messages, I'm not sure capturing these is worth the extra development.

That's a fair enough point. The redirection will have to be issued before the upgrade takes place then, to ensure that output from functions doesn't cause 'headers already sent' issue.

#10 @jane
12 years ago

  • Milestone changed from 3.3 to Future Release

Punting as we're in beta 2, long past enhancment stage. Can revisit for 3.4.

#11 @navjotjsingh
12 years ago

  • Cc navjotjsingh@… added

#12 @chriscct7
9 years ago

  • Focuses ui administration added
  • Keywords needs-refresh added
Note: See TracTickets for help on using tickets.