Closed Bug 783302 Opened 12 years ago Closed 12 years ago

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

Categories

(developer.mozilla.org Graveyard :: Editing, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mbrubeck, Unassigned)

References

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: 12 years ago
Resolution: --- → FIXED
Depends on: 784827
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.