Last Comment Bug 783302 - Error in interwiki macro: Cannot call method 'substr' of undefined
: Error in interwiki macro: Cannot call method 'substr' of undefined
Classification: Other
Component: Editing (show other bugs)
: unspecified
: All All
-- major (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on: 784827
  Show dependency treegraph
Reported: 2012-08-16 09:11 PDT by Matt Brubeck (:mbrubeck)
Modified: 2013-11-11 18:34 PST (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Matt Brubeck (:mbrubeck) 2012-08-16 09:11:40 PDT
The "interwiki" kumascript macro produces the following error:

> Problem executing template interwiki: TypeError: ejs:1
> Cannot call method 'substr' of undefined
>     1 | {{ interwiki("wikimo", "Test", "Test") }}
> --------^

I think the error comes from the following line; I guess "env.locale" is undefined:

> var lang = env.locale.substr(0, 2);
Comment 1 User image John Karahalis [:openjck] 2012-08-23 14:22:52 PDT
Thanks, Matt. I have marked this as needing technical review, so our docs writers will take care of it as part of bug 765225.

Wishing Bugzilla had a RESOLVED:DELEGATED field... :-)

Note You need to log in before you can comment on or make changes to this bug.