WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 years ago

#13071 new defect (bug)

Update bubble appears only at the second load

Reported by: ocean90 Owned by: dd32
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Upgrade/Install Keywords: needs-patch
Focuses: Cc:

Description

Change the version of a plugin and go directly to wp-admin/update-core.php page.
You will see the plugin update in the list but the bubbles on the menu appears only after a reload.

Change History (6)

comment:1 ocean904 years ago

IRC log:

[18 Apr 10 18:25] * nacin * yeah, they're a page load behind.
[18 Apr 10 18:36] * nacin * ocean90: If we switch two giant code blocks in plugins.php, that one pageload delay goes away. I don't want to break anything else though at this point in the cycle
[18 Apr 10 18:37] * nacin * more or less, moving the admin-header.php call (and related code = 70 lines) down below the block that collects all the plugin information (= 100 lines)
[18 Apr 10 18:39] * ocean90 * nacin: so should i create a ticket at first?
[18 Apr 10 18:39] * nacin * If you want. set for 3.1
[18 Apr 10 18:39] * ocean90 * ok
[18 Apr 10 18:40] * nacin * It's low priority, rather minor, but easy to fix. just need to review 200 lines of code to make sure nothing would break.

comment:2 nacin4 years ago

Related to this, if you run an upgrade, at the end of the upgrade, some JS should run that reduces the bubble count by 1 (or more if bulk), or clear the bubble all together if that's the case.

Both the Dashboard > Updates bubble and the Plugins bubble.

comment:3 nacin3 years ago

  • Milestone changed from Awaiting Triage to Future Release

comment:4 Viper007Bond3 years ago

Same thing happens if you directly visit /wp-admin/plugins.php?plugin_status=upgrade when there's an update available. The yellow bar won't be there and you'll need to refresh before you can update.

comment:5 ocean903 years ago

  • Keywords needs-patch added
  • Priority changed from low to normal

comment:6 dd323 years ago

Similar (with a patch): #10884

In this case, any update checks hooked to a page/run on a page, need to be hooked before admin menu generation (which the load-$pagenow hook doesnt).

Note: See TracTickets for help on using tickets.