Make WordPress Core

Opened 7 years ago

Closed 4 years ago

Last modified 4 years ago

#39189 closed defect (bug) (fixed)

Translation Update after 4.7 update gives Javascript Error

Reported by: garrett-eclipse's profile garrett-eclipse Owned by: swissspidy's profile swissspidy
Milestone: 5.1 Priority: normal
Severity: trivial Version: 4.7
Component: Upgrade/Install Keywords: has-patch commit
Focuses: javascript Cc:


I just updated to WordPress 4.7, which then enabled the update translations button, so did so and it updated the translation no problem;

Update Translations
Updating translations for WordPress (en_CA)…
Translation updated successfully.
Return to WordPress Updates page
But my Debug Bar flagged a JS issue, inspecting the full error is;

update-core.php?action=do-translation-upgrade:428 Uncaught TypeError: Cannot read property 'decrementCount' of undefined


It goes away as soon as you go to another page, but wanted to flag the minor bug.

Original Support Ticket -

Attachments (2)

decrementCount.jpg (174.2 KB) - added by Presskopp 6 years ago.
fresh 4.9RC3 installation, first run updating translations
39189.diff (559 bytes) - added by Presskopp 5 years ago.

Download all attachments as: .zip

Change History (16)

#1 @swissspidy
7 years ago


Thanks for opening the ticket! This might be caused by a recent improvement to the update counter, see #13071. However, I wasn't able to reproduce this when updating translations on my local install.

Have you already tried clearing your browser's cache and disabling all plugins?

#2 @garrett-eclipse
7 years ago

  • Keywords close added
  • Resolution set to worksforme
  • Severity changed from normal to trivial
  • Status changed from new to closed

Hi @swissspidy

As I didn't want to roll back the live site I tried to install clean 4.6.1 set to en_CA. And the upgrade to 4.7 seemed to automatically do the translation so that wasn't available after the 4.7 upgrade as it was with my other install.

SO I'm going to guess it was a cache or plugin/theme conflict and close this.


#3 @swissspidy
6 years ago

  • Milestone Awaiting Review deleted

Alright, I'll keep an eye on it nonetheless.

#4 @ocean90
6 years ago

This could be caused by a race condition when the update of a translation was faster than loading the page and update.js which is now loaded in the footer.

#5 @garrett-eclipse
6 years ago

Thanks Guys, do you feel I should reopen this for further investigation? Cheers

6 years ago

fresh 4.9RC3 installation, first run updating translations

#6 @Presskopp
5 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Still coming in Version 5.0-alpha-42389:

update-core.php?action=do-translation-upgrade:379 Uncaught TypeError: Cannot read property 'decrementCount' of undefined
    at update-core.php?action=do-translation-upgrade:379
    at update-core.php?action=do-translation-upgrade:382

#7 @swissspidy
5 years ago

  • Keywords needs-patch added; close removed
  • Milestone set to 5.0

We should be able to fix this race condition by using wp && wp.updates && wp.updates.decrementCount there.

5 years ago

#8 @Presskopp
5 years ago

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

@swissspidy Can you please take a look at the patch approach (following your argumentation, no own powers here)

#9 @swissspidy
5 years ago

  • Owner set to swissspidy
  • Status changed from reopened to reviewing

#10 @johnbillion
5 years ago

  • Milestone changed from 5.0 to 5.0.1

#11 @pento
4 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#12 @swissspidy
4 years ago

  • Keywords commit added; needs-testing removed
  • Milestone changed from 5.0.2 to 5.1

#13 @swissspidy
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 44513:

Upgrade/Install: Prevent possible JavaScript error when updating translations.

Props Presskopp.
Fixes #39189.

Note: See TracTickets for help on using tickets.