Page MenuHomePhabricator

"Invalid token" error when trying to add language link from Wikipedia
Closed, ResolvedPublic

Description

Author: psychonaut

Description:
I'm helping someone translate English Wikipedia articles for Russian Wikipedia. They produced the article [[:ru:St. Laurent Ferry]], which is a translation of [[:en:St. Laurent Ferry]]. They then tried to add a language link from the Russian article to the English article using the widget. They selected the English Wikipedia in the first box, and "St. Laurent Ferry" in the second box. (They started typing the name, and the widget successfully autocompleted it.) However, when they press the button to add the link, they get the following error from the widget:

Произошла непредвиденная ошибка: $1
Подробности
Invalid token

We were able to reproduce this problem several times.


Version: unspecified
Severity: major

Details

Reference
bz70415

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:49 AM
bzimport set Reference to bz70415.
bzimport added a subscriber: Unknown Object (MLST).

Sorry to ask the obvious, but did you try logging out and logging in again?

psychonaut wrote:

Yes, logging out and back in again didn't solve the problem.

psychonaut wrote:

I should also note that they were successfully able to add several other language links on other articles they'd created a few days ago. The problem started only with this article, which is (IIRC) their fourth one.

Created attachment 16375
Error!

I can replicate it too...

Attached:

bug74015.png (702×1 px, 182 KB)

When I try this widget on that page I get a different error message:

An unexpected error occurred: [Exception... "" nsresult: "0x805e0006 ()" location: "JS frame :: https://bits.wikimedia.org/ru.wikipedia.org/load.php?debug=true&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=20140904T182600Z :: .send :: line 9592" data: no].

I believe this was caused by I171db949bdec7fc56228023d0f449301ec470b12, and left a comment explaining why.

In my network console, I see my enwp edit token being passed to Wikidata, which obviously won't work. It retries again, fetching a new edit token from enwp to use on wikidata, which fails again, displaying an error to the user.

I came to report this bug as well on behalf of two users on nowiki who both have the same issue: https://no.wikipedia.org/wiki/Wikipedia:Torget#Problemer_med_interwiki

The error they are getting is "En uventet feil oppsto. 1$ - Invalid token.". I have no idea why it says 1$ and not $1 -- it's not from the system message translation, since that is (and always has been) correct. May not even be relevant at all, but worth keeping in mind.

Scratch my last paragraph, it is apparently $1 and not 1$ (likely just a typo from one of the people who reported it).

we plan to deploy the fix on Monday.

  • Bug 70488 has been marked as a duplicate of this bug. ***
  • Bug 70511 has been marked as a duplicate of this bug. ***

(In reply to Umar from comment #14)

See comment 11.

  • Bug 70566 has been marked as a duplicate of this bug. ***