Page MenuHomePhabricator

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

Description

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

Steps to Reproduce:

Code in Javascript: (see: https://de.wiktionary.org/wiki/Benutzer:Formatierer/js/EditToken.js)

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

Actual Results:
null

Expected Results:
a token

Event Timeline

Schnark subscribed.

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