Yeah, that was just a typo copying the code over. It is actually just the one $token
variable. Same with the double quotes. I’ve tried no quotes as well though, along with
single quotes, smiley faces, hearts, etc.
I was also going to do some more urlencoding, but just wanted to get the basic page move
Thanks though, I appreciate you taking a look. I have no doubt it could be something as
simple as that.
[mailto:email@example.com] On Behalf Of Niklas Keller
Sent: Sunday, April 27, 2014 11:56 AM
To: MediaWiki API announcements & discussion
Subject: Re: [Mediawiki-api] Bad or Invalid Token in Extension
I don't have enough time right now to have a deeper look at your code, but:
$token = $token = $wgUser->editToken();
Although this isn't an error, it's still unnecessary.
Next, are you really using these quotes: ” instead of ". I think this happened when
you copied the code because it'll result in an syntax error. Additionally, you
shouldn't put pure variables into quotes, there's no reason why I would do so.
You should urlencode all parameters, not just the token.