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

RESOLVED FIXED

Status

--
major
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: mbrubeck, Unassigned)

Tracking

Details

(Reporter)

Description

6 years ago
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
(Reporter)

Updated

6 years ago
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Updated

6 years ago
Depends on: 784827
(Assignee)

Updated

6 years ago
Version: Kuma → unspecified
(Assignee)

Updated

6 years ago
Component: Docs Platform → Editing
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.