Make WordPress Core

Opened 11 years ago

Closed 13 months ago

Last modified 11 months ago

#36823 closed defect (bug) (worksforme)

"TypeError: wp.updates is undefined" when installing a plugin

Reported by: tfrommen Owned by:
Priority: normal Milestone:
Component: Upgrade/Install Version: 4.9.2
Severity: normal Keywords: close
Cc: Focuses: javascript

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)

36823.patch​ (677 bytes ) - added by tfrommen 11 years ago.
decrementCount.jpg​ (174.2 KB ) - added by Presskopp 9 years ago.

Download all attachments as: .zip

Change History (20)

#1 @swissspidy
11 years ago

  • Component Administration → Upgrade/Install
  • Keywords has-patch needs-testing added

#2 @swissspidy
10 years ago

  • Milestone Awaiting Review → 4.6

Just needs someone to reproduce the bug and verify the fix.

#3 @j-falk
10 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.

#4 @SergeyBiryukov
10 years ago

  • Keywords reporter-feedback added

#5 @swissspidy
10 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 @tfrommen
10 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: @swissspidy
10 years ago

  • Milestone 4.6
  • Resolution → worksforme
  • Status new → closed

Looks like this is no longer an issue then.

#8 in reply to: ↑ 7 @tfrommen
10 years ago

  • Resolution worksforme
  • Status closed → 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:

https://i.imgur.com/6kXQcGe.png

#9 @ocean90
10 years ago

  • Milestone → Awaiting Review

#10 @swissspidy
10 years ago

  • Milestone Awaiting Review → Future Release

36823.patch​ makes sense, but I can't reproduce this.

#11 follow-up: @jrf
9 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:

  1. Go to the /wp-admin/update-core.php page.
  2. The only updates showing were translations, so I click the button to run that update.
  3. 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.

https://snag.gy/MBt72J.jpg

  1. Now there are suddenly two plugin updates available.
  2. I run those.
  3. I return to the WordPress Updates Page, there are new translations available again.
  4. 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:

https://snag.gy/3m1zk4.jpg

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.

Last edited 9 years ago by jrf (previous) (diff)

#12 in reply to: ↑ 11 @tfrommen
9 years ago

  • Keywords reporter-feedback removed

Replying to jrf:

So the short of it is, that it seems to only happen when only translations are being updated.

Yes, this is what I encountered as well so far (see ticket description and comment).

#13 @tfrommen
9 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.

#14 @Presskopp
9 years ago

Can't remember what build that was, but 4.9RC, I forgot about the screenshot, but here it is:

Last edited 9 years ago by Presskopp (previous) (diff)

#15 @hardlyneutral
9 years ago

  • Version → 4.9.2

I just received a report from a user that encountered this issue. I recently internationalized my plugin and it does not have any GlottPress translations. Perhaps that might be part of the issue?

#16 @SirLouen
20 months ago

  • Keywords close added; has-patch needs-testing removed

Reproduction Report

Description

This report can't validate that the error could be reproduced following the steps by @jrf here

This is an old report, so maybe it was already sorted. Candidate for closing and maybe reopened in the future if someone finds something new.

Environment

  • WordPress: 6.8-beta2-59971-src
  • PHP: 8.2.28
  • Server: nginx/1.27.4
  • Database: mysqli (Server: 8.4.4 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 134.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Nineteen 3.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Steps Done

  1. Set the site language to Deutsch
  2. Go to /languages and remove all de-DE files
  3. Go to wp-admin/update-core.php
  4. Click on Update Translations.

Actual Results

  1. ❌ The error condition doesn't occur anymore.

Additional Notes

Wondering if the patch to 57183 could have help in the final resolution of this issue or if its unrelated.

Last edited 20 months ago by SirLouen (previous) (diff)

#17 @Presskopp
13 months ago

  • Resolution → worksforme
  • Status reopened → closed

Seems like it's not an issue anymore

#18 @swissspidy
11 months ago

  • Milestone Future Release

Removing milestone from closed ticket.

Note: See TracTickets for help on using tickets.