Page MenuHomePhabricator

Uncaught TypeError: imeLanguageList.forEach is not a function
Closed, ResolvedPublicPRODUCTION ERROR

Description

Trying to use the edit toolbar on a wiki it does not work, and gives the following console error:

111:44:43.017 VM185:131 Uncaught TypeError: imeLanguageList.forEach is not a function
2 at Object.mw.ime.getIMELanguageList (<anonymous>:131:10451)
3 at Object.mw.ime.addIme (<anonymous>:135:580)
4 at Object.mw.ime.handleFocus (<anonymous>:135:487)
5 at HTMLTextAreaElement.<anonymous> (<anonymous>:135:32)
6 at HTMLBodyElement.dispatch (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:69)
7 at HTMLBodyElement.elemData.handle (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:65)
8 at Object.trigger (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:113)
9 at Object.simulate (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114)
10 at HTMLDocument.handler (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114)
11mw.ime.getIMELanguageList @ VM185:131
12mw.ime.addIme @ VM185:135
13mw.ime.handleFocus @ VM185:135
14(anonymous) @ VM185:135
15dispatch @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:69
16elemData.handle @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:65
17trigger @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:113
18simulate @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114
19handler @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114
2011:44:43.122 VM185:131 Uncaught TypeError: imeLanguageList.forEach is not a function
21 at Object.mw.ime.getIMELanguageList (<anonymous>:131:10451)
22 at Object.mw.ime.addIme (<anonymous>:135:580)
23 at Object.mw.ime.handleFocus (<anonymous>:135:487)
24 at HTMLTextAreaElement.<anonymous> (<anonymous>:135:32)
25 at HTMLBodyElement.dispatch (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:69)
26 at HTMLBodyElement.elemData.handle (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:65)
27 at Object.trigger (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:113)
28 at HTMLTextAreaElement.<anonymous> (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114)
29 at Function.each (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:4)
30 at jQuery.fn.init.each (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:2)
31mw.ime.getIMELanguageList @ VM185:131
32mw.ime.addIme @ VM185:135
33mw.ime.handleFocus @ VM185:135
34(anonymous) @ VM185:135
35dispatch @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:69
36elemData.handle @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:65
37trigger @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:113
38(anonymous) @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114
39each @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:4
40each @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:2
41trigger @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:114
42(anonymous) @ VM158:26
43each @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:4
44each @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:2
45encapsulateSelection @ VM158:26
46$.fn.textSelection @ VM158:30
47doAction @ load.php?lang=en&modules=ext.wikiEditor&skin=monobook&version=11xn0xs:17
48(anonymous) @ load.php?lang=en&modules=ext.wikiEditor&skin=monobook&version=11xn0xs:19
49oo.EventEmitter.emit @ VM158:166
50OO.ui.mixin.ButtonElement.onClick @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:178
51dispatch @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:69
52elemData.handle @ load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:65

Thanks in advance.

Event Timeline

MarcoAurelio changed the subtype of this task from "Task" to "Bug Report".Aug 16 2019, 9:51 AM

Not sure which component/tag to use. Using MediaWiki-General for now.

Krinkle added a subscriber: Krinkle.

getIMELanguageList is from ULS's JavaScript module.

@MarcoAurelio Example url, and which browser? Also, does it happen with &safemode=on?

@Krinkle Thanks for your reply.

Given that I got this in a private wiki I am unable to publicly post the information you require regarding the URL. I'll be happy to provide it to you by other private means if that's okay, or via a encrypted PGP comment here.

If I add &debug=true the edit toolbar disappeared.

The issue is still reproducible with &safemode=on.

I also get all kinds of deprecation warnings (also with safemode on):

  • This page is using the deprecated ResourceLoader module "jquery.throttle-debounce". Please use OO.ui.throttle/debounce instead. See T213426.
  • This page is using the deprecated ResourceLoader module "jquery.ui.position".
  • This page is using the deprecated ResourceLoader module "jquery.ui.widget".
  • This page is using the deprecated ResourceLoader module "jquery.ui.core". Please use OOUI instead.

Thank you.

Can you reproduce this issue on a public wiki?

What steps are you using to reproduce the issue (on the private wiki), and in which browser? E.g. start with "Click edit source on a main space page" and then what.

The stack trace shows the problem starts by the click on a button, which button is that? Which editor is used?

Can you reproduce this issue on a public wiki?

I've not encountered this issue anywhere. And before you ask, our $skin.css/js and $common.js are empty :-)

What steps are you using to reproduce the issue (on the private wiki), and in which browser? E.g. start with "Click edit source on a main space page" and then what.

  1. Go to any page in said private wiki.
  2. Click edit.
  3. Write a word, select it and try to bolden it with the edit toolbar.
  4. Nothing happens && error reported in the console.

Curiously, before editting the same error appears but only as a warning:

TypeError: imeLanguageList.forEach is not a function
    at Object.mw.ime.getIMELanguageList (<anonymous>:131:10451)
    at Object.mw.ime.addIme (<anonymous>:135:580)
    at Object.mw.ime.handleFocus (<anonymous>:135:487)
    at <anonymous>:642:409
    at fire (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:45)
    at Object.fireWith [as resolveWith] (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:47)
    at Object.deferred.<computed> [as resolve] (load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=monobook&version=124jwy6:50)
    at Object.ready (<anonymous>:6:34)
    at doPropagation (load.php?lang=en&modules=startup&only=scripts&raw=1&skin=monobook:8)

Browser: Google Chrome. Versión 76.0.3809.100 (Build oficial) (64 bits).

The stack trace shows the problem starts by the click on a button, which button is that? Which editor is used?

It's WikiEditor a.k.a. 2010 wikitext editor.

mmodell changed the subtype of this task from "Bug Report" to "Production Error".Aug 28 2019, 11:05 PM

Still happening as of today:

113:21:56.548 jquery.js?6fb03:9601 XHR finished loading: POST "https://steward.wikimedia.org/w/api.php".
2send @ jquery.js?6fb03:9601
3ajax @ jquery.js?6fb03:9207
4jQuery.ajax @ jquery.migrate.js?cacf7:233
5ajax @ index.js?a0a02:249
6post @ index.js?a0a02:150
7(anonymous) @ index.js?a0a02:327
8mightThrow @ jquery.js?6fb03:3535
9process @ jquery.js?6fb03:3603
10setTimeout (async)
11(anonymous) @ jquery.js?6fb03:3641
12fire @ jquery.js?6fb03:3269
13add @ jquery.js?6fb03:3328
14(anonymous) @ jquery.js?6fb03:3661
15jQuery.Deferred @ jquery.migrate.js?cacf7:616
16then @ jquery.js?6fb03:3646
17postWithToken @ index.js?a0a02:318
18stashEdit @ mediawiki.action.edit.stash.js?7fc12:89
19checkStash @ mediawiki.action.edit.stash.js?7fc12:111
2013:21:57.747 ext.uls.ime.js?f76e2:54 Uncaught TypeError: imeLanguageList.forEach is not a function
21 at Object.mw.ime.getIMELanguageList (ext.uls.ime.js?f76e2:54)
22 at Object.mw.ime.addIme (ext.uls.ime.js?f76e2:282)
23 at Object.mw.ime.handleFocus (ext.uls.ime.js?f76e2:269)
24 at HTMLTextAreaElement.<anonymous> (ext.uls.ime.js?f76e2:230)
25 at HTMLBodyElement.dispatch (jquery.js?6fb03:5184)
26 at HTMLBodyElement.elemData.handle (jquery.js?6fb03:4992)
27 at Object.trigger (jquery.js?6fb03:8250)
28 at Object.simulate (jquery.js?6fb03:8319)
29 at HTMLDocument.handler (jquery.js?6fb03:8353)
30mw.ime.getIMELanguageList @ ext.uls.ime.js?f76e2:54
31mw.ime.addIme @ ext.uls.ime.js?f76e2:282
32mw.ime.handleFocus @ ext.uls.ime.js?f76e2:269
33(anonymous) @ ext.uls.ime.js?f76e2:230
34dispatch @ jquery.js?6fb03:5184
35elemData.handle @ jquery.js?6fb03:4992
36trigger @ jquery.js?6fb03:8250
37simulate @ jquery.js?6fb03:8319
38handler @ jquery.js?6fb03:8353
3913:22:00.961 oojs.jquery.js?f1afe:886 Uncaught TypeError: imeLanguageList.forEach is not a function
40 at Object.mw.ime.getIMELanguageList (ext.uls.ime.js?f76e2:54)
41 at Object.mw.ime.addIme (ext.uls.ime.js?f76e2:282)
42 at Object.mw.ime.handleFocus (ext.uls.ime.js?f76e2:269)
43 at HTMLTextAreaElement.<anonymous> (ext.uls.ime.js?f76e2:230)
44 at HTMLBodyElement.dispatch (jquery.js?6fb03:5184)
45 at HTMLBodyElement.elemData.handle (jquery.js?6fb03:4992)
46 at Object.trigger (jquery.js?6fb03:8250)
47 at HTMLTextAreaElement.<anonymous> (jquery.js?6fb03:8328)
48 at Function.each (jquery.js?6fb03:355)
49 at jQuery.fn.init.each (jquery.js?6fb03:189)
50mw.ime.getIMELanguageList @ ext.uls.ime.js?f76e2:54
51mw.ime.addIme @ ext.uls.ime.js?f76e2:282
52mw.ime.handleFocus @ ext.uls.ime.js?f76e2:269
53(anonymous) @ ext.uls.ime.js?f76e2:230
54dispatch @ jquery.js?6fb03:5184
55elemData.handle @ jquery.js?6fb03:4992
56trigger @ jquery.js?6fb03:8250
57(anonymous) @ jquery.js?6fb03:8328
58each @ jquery.js?6fb03:355
59each @ jquery.js?6fb03:189
60trigger @ jquery.js?6fb03:8327
61(anonymous) @ jquery.textSelection.js?33599:205
62each @ jquery.js?6fb03:355
63each @ jquery.js?6fb03:189
64encapsulateSelection @ jquery.textSelection.js?33599:149
65$.fn.textSelection @ jquery.textSelection.js?33599:433
66doAction @ load.php?debug=true&lang=en&modules=ext.wikiEditor&skin=monobook&version=10x3e:1036
67(anonymous) @ load.php?debug=true&lang=en&modules=ext.wikiEditor&skin=monobook&version=10x3e:1146
68OO.EventEmitter.emit @ oojs.jquery.js?f1afe:877
69OO.ui.mixin.ButtonElement.onClick @ ButtonElement.js:153
70dispatch @ jquery.js?6fb03:5184
71elemData.handle @ jquery.js?6fb03:4992
72setTimeout (async)
73OO.EventEmitter.emit @ oojs.jquery.js?f1afe:885
74OO.ui.mixin.ButtonElement.onClick @ ButtonElement.js:153
75dispatch @ jquery.js?6fb03:5184
76elemData.handle @ jquery.js?6fb03:4992

What do $.ime.preferences.getPreviousLanguages() and mw.uls.getFrequentLanguageList() return for you? You can try in the developer console.

What do $.ime.preferences.getPreviousLanguages() and mw.uls.getFrequentLanguageList() return for you? You can try in the developer console.

$.ime.preferences.getPreviousLanguages()
Uncaught TypeError: Cannot read property 'preferences' of undefined

mw.uls.getFrequentLanguageList()
(2) ["en", "es"]

I have reset my user preferences (Special:Preferences/reset) and that seems to have fixed the issue. Doing further tests.

It looks it's working. Now I just get deprecation warnings:

JQMIGRATE: Migrate is installed with logging active, version 3.0.1

This page is using the deprecated ResourceLoader module "jquery.throttle-debounce". Please use OO.ui.throttle/debounce instead. See https://phabricator.wikimedia.org/T213426

This page is using the deprecated ResourceLoader module "jquery.ui". Please use OOUI instead.

JQMIGRATE: jQuery.fn.delegate() is deprecated

This page is using the deprecated ResourceLoader module "jquery.ui.resizable". Please use the main `jquery.ui` module, not this alias.

Thanks. I hope this was a isolated fluke and not affecting large number of people.