Page MenuHomePhabricator

Uncaught TypeError: imeLanguageList.forEach is not a function
Open, Needs TriagePublic

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 16 2019, 9:51 AM
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.

Krinkle added a comment.EditedAug 16 2019, 11:35 AM

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?

MarcoAurelio added a comment.EditedAug 16 2019, 11:44 AM

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".Wed, Aug 28, 11:05 PM