VisualEditor: Return of the invalid token on save attempt problem?
Closed, ResolvedPublic


(This sounds exactly like bug 50424, but that was marked fixed on 2013-07-15 with "deployed within the hour".)

I had made source edits to a page over https. Looking at it 30+ minutes later I wanted to make one more quick edit, so I clicked [Edit]. VE worked fine, Save dialog, [Review your changes] worked, but the final [Save page] drew blue bars before doing nothing.

Firebug's network console showed the API requst visualeditoredit with

basetimestamp	20130723212405
format	json
minor	1
oldid	745108
page	Manual:How_to_debug
starttimestamp	20130723232059

was failing with

{"servedby":"mw1139","error":{"code":"badtoken","info":"Invalid token"}}

I had a similar occurrence a few days ago where the API reported badtoken. I can't remember the specifics of that, but I assumed it was my mistake because I was using multiple accounts on different wikis. This time I wasn't doing anything special. Connecting to in another tab shows me as still logged in.

Maybe there are two bugs here: VE's inability to recover from this, and the lack of a "VE had an internal error" with suggestion as to how to what to do (e.g. copy the right-hand column of [Review changes]. Regarding the former, when I've lost state with source editing I usually find [Show preview] brings it back, maybe VE can implement something like this internally.

Version: unspecified
Severity: normal

bzimport set Reference to bz51915.
Spage created this task.Via LegacyJul 23 2013, 11:40 PM
Catrope added a comment.Via ConduitJul 23 2013, 11:45 PM

When the API responds with badtoken, VE *should* refetch the token and try again. I'm fairly sure that was implemented, but not 100% sure.

Spage added a comment.Via ConduitJul 24 2013, 2:20 AM

(In reply to comment #1)
FWIW when I investigated this by clicking the final [Save page] again, I only saw the one visualeditoredit API request in Firebug's Network tab.

Thryduulf added a comment.Via ConduitJul 26 2013, 10:33 PM

en.wp editor Rpyle731 has just reported an occurrence of this:
"While putting in stub templates in article "[[Zhang Shi (prince)]]" using the visual editor, when trying to save I got the text

"Error loading data from server. Unsuccessful request: Invalid token.""

bzimport added a comment.Via ConduitJul 29 2013, 7:32 PM

mael.leguevel wrote:

I had the same message with the following scenario:
Edit an article, not logged in. Then, log in from another tab. Trying to save the article from the first tab, I get the same error message.

Jdforrester-WMF added a comment.Via ConduitJul 31 2013, 7:05 PM

This was fixed in gerrit 76859 which was merged yesterday and will go out today.

Mattflaschen removed a subscriber: Mattflaschen.Via WebDec 3 2014, 5:36 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.