Error in interwiki macro: Cannot call method 'substr' of undefined

RESOLVED FIXED

Status

defect
--
major
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: mbrubeck, Unassigned)

Tracking

Details

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);

https://developer.mozilla.org/en-US/docs/Template:interwiki
Summary: Error in interwiki macro: Cannot call 'substr' of undefined → Error in interwiki macro: Cannot call method 'substr' of undefined
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... :-)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Depends on: 784827
Version: Kuma → unspecified
Component: Docs Platform → Editing
You need to log in before you can comment on or make changes to this bug.