#39189 closed defect (bug) (fixed)
Translation Update after 4.7 update gives Javascript Error
Reported by: | garrett-eclipse | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | trivial | Version: | 4.7 |
Component: | Upgrade/Install | Keywords: | has-patch commit |
Focuses: | javascript | Cc: |
Description
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)
Change History (16)
#2
@
8 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.
Thanks
#4
@
8 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.
#6
@
7 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
@
7 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.
Hi,
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?