Page MenuHomePhabricator

mw.user.tokens.get('editToken') returns null
Closed, InvalidPublicBUG REPORT


Get EditToken doesn't work in Javascript Api since Mediawiki 1.35.0-wmf.1

Steps to Reproduce:

Code in Javascript: (see:

mw.loader.using( ['mediawiki.user'], function () {
 var tok = mw.user.tokens.get('editToken');
 console.log("Token: " + tok);

Actual Results:

Expected Results:
a token

Event Timeline

Schnark added a subscriber: Schnark.

editToken has been deprecated for years and removed recently. See T234576 and use csrfToken instead.