Page MenuHomePhabricator

Saving a new or changed translation unit fails with IME-related jQuery "TypeError"
Closed, ResolvedPublic

Description

*Go to a translation page on Meta (e.g.
https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Wikimedia+Highlights%2C+July+2013&action=page&filter=&language=de )

*Edit an existing translation, or start a new translation for a translation unit (by hovering the mouse right of the right column, and clicking the pencil icon that appears)

*Click "Save translation"

*The new text appears on yellow background in the right column (and the subsequent unit is opened in the translation editor), but it is not actually saved - it does not appear in the translated page's revision history or in one's user contributions.

I do not always encounter this error, but very often (on at least four different translation pages in the last several weeks, under two different accounts and two different browsers).

Below are some example error messages as shown in the browser's Error Console (Firefox) / JavaScript Console (Chrome), under Ubuntu 13.04:

When trying to save a new or changed translation unit in Firefox 23:

Error: TypeError: $.ime.sources[inputmethodId] is undefined
Source File: https://bits.wikimedia.org/meta.wikimedia.org/load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*
Line: 4

When trying to save a new translation unit in Chromium 28:

Uncaught TypeError: Cannot read property 'depends' of undefined load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:4

When trying to save a changed translation unit in Chromium 28:

Uncaught TypeError: Cannot read property 'depends' of undefined load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:4
IME.load load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:4
IMESelector.selectIM load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:17
IMESelector.selectLanguage load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:16
(anonymous function) load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce….page.startup%7Cskins.vector.js&skin=vector&version=20130909T203640Z&*:111
jQuery.event.dispatch load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:45
elemData.handle.eventHandle load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:38
jQuery.event.trigger load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:42
(anonymous function) load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:53
jQuery.extend.each load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…il%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:8
jQuery.fn.jQuery.each load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…il%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:4
jQuery.fn.extend.trigger load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:53
jQuery.fn.(anonymous function) load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:54
$.fn.extend.focus load.php?debug=false&lang=en&modules=jquery.ui.button%2Ccore%2Cdialog%2Cdra…%2Cposition%2Cresizable%2Cwidget&skin=vector&version=20130905T145103Z&*:11
TranslateEditor.show load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce…i.page.startup%7Cskins.vector.js&skin=vector&version=20130909T203640Z&*:26
TranslateEditor.next load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce…i.page.startup%7Cskins.vector.js&skin=vector&version=20130909T203640Z&*:14
TranslateEditor.save load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce…i.page.startup%7Cskins.vector.js&skin=vector&version=20130909T203640Z&*:12
(anonymous function) load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce…i.page.startup%7Cskins.vector.js&skin=vector&version=20130909T203640Z&*:20
jQuery.event.dispatch load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:45
elemData.handle.eventHandle load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:38

This error is pretty annoying, and could possibly be reducing the amount of volunteer translation we are seeing on Meta by a substantial amount.


Version: master
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=59648

Details

Reference
bz53963

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:04 AM
bzimport set Reference to bz53963.
bzimport added a subscriber: Unknown Object (MLST).

The ID of the input method for German has changed recently. We're suspecting that to be the cause. Can you select an input method for another language, then go back to the current input method, and see if the problem still exists?

This may be an issue with properly handling (currently) invalid local preferences that we would need to resolve.

(In reply to comment #1)

The ID of the input method for German has changed recently. We're suspecting
that to be the cause. Can you select an input method for another language,
then
go back to the current input method, and see if the problem still exists?

This may be an issue with properly handling (currently) invalid local
preferences that we would need to resolve.

Thanks, that may be the reason. To be clear, I had observed this error in several translation languages, and several interface languages (setlang), not just German.

But indeed, when I use the little keyboard icon in the translation unit edit form to switch to "Use native keyboard CTRL+M" (English), the translation saves properly after that. And setting the input method to German again in the same place generates a very similar error as earlier:

Uncaught TypeError: Cannot read property 'depends' of undefined load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:4
IME.load load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:4
IMESelector.selectIM load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:17
IMESelector.selectLanguage load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:16
(anonymous function) load.php?debug=false&lang=en&modules=jquery.ime&skin=vector&version=20130905T145450Z&*:13
jQuery.event.dispatch load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:45
elemData.handle.eventHandle load.php?debug=false&lang=en&modules=jquery%2Cmediawiki%2CSpinner%7Cjquery.…l%7Cmw.MwEmbedSupport&only=scripts&skin=vector&version=20130905T145332Z:38

As an aside, in Chrome (but not Firefox) I also see the following warning when opening the edit form by clicking the pencil icon:

ULS: Unknown language doi. load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce….page.startup%7Cskins.vector.js&skin=vector&version=20130910T001026Z&*:274
ULS: Unknown language fonipa. load.php?debug=false&lang=en&modules=ext.centralNotice.bannerController%7Ce….page.startup%7Cskins.vector.js&skin=vector&version=20130910T001026Z&*:274

See also https://meta.wikimedia.org/wiki/Talk:Translation_requests#Translations_cant.27t_be_saved . As this bug appears to continue to disrupt translations for a major translation language, frustrating and possibly driving away volunteer translators in that language, its resolution would be much appreciated.

See also https://meta.wikimedia.org/w/index.php?title=Help_Forum&oldid=6572324#Translation_interface : "No matter if I use Firefox or Chrome, when I click 'save', it regularly doesn't save the edit, so I constantly need to reload my list of contributions to check if it worked"

(In reply to comment #5)

See also
https://meta.wikimedia.org/w/index.
php?title=Help_Forum&oldid=6572324#Translation_interface
: "No matter if I use Firefox or Chrome, when I click 'save', it regularly
doesn't save the edit, so I constantly need to reload my list of
contributions
to check if it worked"

There is no indication that this report, and bug 53963 are related.