Make WordPress Core

Opened 2 years ago

Last modified 6 months ago

#25777 new defect (bug)

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

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


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 2 years ago.
25777.diff (811 bytes) - added by Ipstenu 2 years ago.
Supress update network if you have to upgrade too!
25777.2.diff (770 bytes) - added by jdgrimes 2 years ago.
Unhook site_admin_notice() when we are displaying the update nag.

Download all attachments as: .zip

Change History (8)

@jdgrimes2 years ago

@Ipstenu2 years ago

Supress update network if you have to upgrade too!

comment:1 @Ipstenu2 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)

@jdgrimes2 years ago

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

comment:2 @jdgrimes2 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.

comment:3 @SergeyBiryukov2 years ago

  • Milestone changed from Awaiting Review to 3.8

comment:4 @nacin22 months 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.

comment:5 @jeremyfelt6 months ago

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