Opened 8 years ago
Last modified 7 years ago
#36823 reopened defect (bug)
"TypeError: wp.updates is undefined" when installing a plugin
Reported by: | tfrommen | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | 4.9.2 |
Component: | Upgrade/Install | Keywords: | has-patch needs-testing |
Focuses: | javascript | Cc: |
Description
When I install a new plugin that has a translation pack for my current language (which is not en_US
), I get the following error:
TypeError: wp.updates is undefined
if ( wp && wp.updates.decrementCount ) {
Patch will follow soonish.
Attachments (2)
Change History (17)
#1
@
8 years ago
- Component changed from Administration to Upgrade/Install
- Keywords has-patch needs-testing added
#3
@
8 years ago
@tfrommen I am trying to reproduce the bug and verify the fix, could you give an example of a language and a plugin that gives this issue?
I am trying with with de_DE and Formidable on a trunk WP install but don't see any error in the js console.
#5
@
8 years ago
It's worth noting that the code in question isn't run anymore for most parts thanks to the merge of Shiny Updates V2. It's only used on update-core.php right now, for example when updating language packs.
#6
@
8 years ago
It's worth noting that the code in question isn't run anymore for most parts thanks to the merge of Shiny Updates V2. It's only used on update-core.php right now, for example when updating language packs.
Well, then this might be fixed for 4.6, because on update-core.php
, the according script file is enqueued, so wp.updates
is defined there.
#7
follow-up:
↓ 8
@
8 years ago
- Milestone 4.6 deleted
- Resolution set to worksforme
- Status changed from new to closed
Looks like this is no longer an issue then.
#8
in reply to:
↑ 7
@
8 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
Replying to swissspidy:
Looks like this is no longer an issue then.
Well, ... updating the (Spanish) core language pack (directly after updating to 4.7.2) got me a similar error, again:
#10
@
8 years ago
- Milestone changed from Awaiting Review to Future Release
36823.patch makes sense, but I can't reproduce this.
#11
follow-up:
↓ 12
@
7 years ago
I've just been able to reproduce this bug twice and can confirm that it still exists in WP 4.8.
Steps I took which caused me to encounter the bug:
- Go to the /wp-admin/update-core.php page.
- The only updates showing were translations, so I click the button to run that update.
- It runs a while and downloads a lot of core translations. When the run ends, I see the following js error in the Debug Bar.
- Now there are suddenly two plugin updates available.
- I run those.
- I return to the WordPress Updates Page, there are new translations available again.
- I click on the Update translation button and see the plugin translations being pulled in. When the update is finished, I see the same js error but with a different line number:
So the short of it is, that it seems to only happen when only translations are being updated.
The easiest way to reproduce (other than coming across it in the wild like I did), would probably be to remove a couple of translation files from the languages
folder, getting WP to check for new updates from the Update Core page via the "Check again" button and hoping it will pick on the removed files. If it does, you should now have an install with only translation updates available which is the basis needed to reproduce the bug.
#13
@
7 years ago
For what it's worth, I'm unable to reproduce this with WordPress 4.8.1, even though I don't see any changes related to this issue.
Just needs someone to reproduce the bug and verify the fix.