[wp-trac] [WordPress Trac] #41407: Updating a plugin from the Plugin Install Screen throws a JavaScript error
WordPress Trac
noreply at wordpress.org
Sat Jul 22 15:02:55 UTC 2017
#41407: Updating a plugin from the Plugin Install Screen throws a JavaScript error
-----------------------------+-----------------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: trunk
Severity: normal | Keywords:
Focuses: administration |
-----------------------------+-----------------------------
Hi,
`/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 :
[[Image(https://cldup.com/U0tmTYg-Dr.png)]]
If from there i click on the "Update Now" button, i get this result :
[[Image(https://cldup.com/NWin8FrfHg.png)]]
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.
[[Image(https://cldup.com/bwTZrH0S9G.png)]]
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41407>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list