Make WordPress Core

Opened 11 years ago

Last modified 6 years ago

#25777 new defect (bug)

Two update nags shown in multisite if all blogs aren't updated before the next release

Reported by: jdgrimes's profile jdgrimes Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.6.1
Component: Upgrade/Install Keywords: has-patch
Focuses: multisite Cc:

Description

On a multisite install, the user can be shown two update nags (see attached screenshot). As you can see, one nag is asking the user to update to the latest version, while the other is asking them to upgrade their other sites. This happens on a site on the network that the user updated, but didn't update all of the other sites on the network. If the other sites don't get updated before the next release, they will be shown both nags.

The first nag is being shown by the update_nag() function (/wp-admin/includes/update.php#L198), the second by site_admin_notice() (/wp-admin/includes/ms.php#L606).

Attachments (3)

double-nags.png (19.9 KB) - added by jdgrimes 11 years ago.
25777.diff (811 bytes) - added by Ipstenu 11 years ago.
Supress update network if you have to upgrade too!
25777.2.diff (770 bytes) - added by jdgrimes 11 years ago.
Unhook site_admin_notice() when we are displaying the update nag.

Download all attachments as: .zip

Change History (8)

@jdgrimes
11 years ago

@Ipstenu
11 years ago

Supress update network if you have to upgrade too!

#1 @Ipstenu
11 years ago

Ain't that a sticky wicket.

So I think the best course here would be to suppress update_nag() if site_admin_notice() is also being shown. Attached a diff with a first pass at it. Works on 3.6 and 3.7 (and of course trunk)

@jdgrimes
11 years ago

Unhook site_admin_notice() when we are displaying the update nag.

#2 @jdgrimes
11 years ago

  • Keywords has-patch added

25777.2.diff is an alternative that unhooks the site_admin_notice() function when the update nag is displayed. Either way will work, this just seemed like it might be simpler and more maintainable.

#3 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to 3.8

#4 @nacin
11 years ago

  • Milestone changed from 3.8 to Future Release
  • Severity changed from normal to minor

This is subjective. On one hand, we don't want two notices like this. On the other, one is referring to files, while the other is referring to the DB. The DB upgrade is still important — but it'll run on wp-admin hits when individual sites are visited.

We're pretty good about the lack of a DB upgrade not actually tanking a site (specifically to be mindful of multisite networks), so maybe we could get away with not showing the second notice here. That said, we don't show an update bubble for this (I don't think), so there's no way to know you haven't completed the DB process. That's also kind of lame.

Let's move this out of 3.8 for now, pending further multisite discussion.

#5 @jeremyfelt
10 years ago

  • Focuses multisite added
Note: See TracTickets for help on using tickets.