Make WordPress Core

Opened 16 months ago

Last modified 3 months ago

#39189 reviewing defect (bug)

Translation Update after 4.7 update gives Javascript Error

Reported by: garrett-eclipse Owned by: swissspidy
Milestone: 5.0 Priority: normal
Severity: trivial Version: 4.7
Component: Upgrade/Install Keywords: has-patch needs-testing
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

at https://bearmountain.ca/wp-admin/update-core.php?action=do-translation-upgrade:428:28
at https://bearmountain.ca/wp-admin/update-core.php?action=do-translation-upgrade:431:8

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

Original Support Ticket - https://wordpress.org/support/topic/translation-update-after-4-7-update-gives-javascript-error/

Attachments (2)

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

Download all attachments as: .zip

Change History (11)

#1 @swissspidy
16 months 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
16 months 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
16 months ago

  • Milestone Awaiting Review deleted

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

#4 @ocean90
16 months 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
16 months ago

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

4 months ago

fresh 4.9RC3 installation, first run updating translations

#6 @Presskopp
3 months 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
3 months 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.

3 months ago

#8 @Presskopp
3 months 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
3 months ago

  • Owner set to swissspidy
  • Status changed from reopened to reviewing
Note: See TracTickets for help on using tickets.