Make WordPress Core

Opened 2 months ago

Last modified 2 months ago

#41407 reviewing defect (bug)

Updating a plugin from the Plugin Install Screen throws a JavaScript error

Reported by: imath Owned by: swissspidy
Milestone: 4.9 Priority: normal
Severity: normal Version: trunk
Component: Upgrade/Install Keywords: has-patch shiny-updates
Focuses: administration Cc:



/wp-admin/js/updates.js when refreshing the screen to decrement the count needs window._wpUpdatesItemCounts to be set. This is done using wp_localize_script() in the regular plugins list table. But this is not done in the plugin *install* list table.

When going into the Plugin Install screen having a plugin to upgrade we get this :


If from there i click on the "Update Now" button, i get this result :


The plugin is updated, but the screen is not refreshed. Bubbles in the WP Admin Bar and in the menu still show there's one plugin to upgrade.


And there's actually a JavaScript error because window._wpUpdatesItemCounts is undefined.

Using the patch i'm adding to this ticket, it's solving the issue.

Attachments (1)

41407.patch (3.5 KB) - added by imath 2 months ago.

Download all attachments as: .zip

Change History (3)

2 months ago

#1 @imath
2 months ago

  • Keywords has-patch added

#2 @swissspidy
2 months ago

  • Keywords shiny-updates added
  • Milestone changed from Awaiting Review to 4.9
  • Owner set to swissspidy
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.