VisualEditor: [Regression] Switch to wikitext feature gives an Edit conflict warning when editing from IP
Closed, ResolvedPublic

Description

I thought it was Opera's fault,
but tested this again today and it's not related to the browser you're using.
It appears that when you edit as an unregistered user (on wikis which allow you to...) you'll always get an Edit conflict page when you try to save after you switched to wikitext.
Tested on multiple wikis on both ns0 and ns2.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=56767

Details

Reference
bz56835
Elitre created this task.Nov 9 2013, 10:09 AM

Change 95730 had a related patch set uploaded by Catrope:
Share code between conflict resolution and the edit source switch

https://gerrit.wikimedia.org/r/95730

Change 95730 merged by jenkins-bot:
Share code between conflict resolution and the edit source switch

https://gerrit.wikimedia.org/r/95730

Reported again on it.wp, I verified it on my sandbox there (http://it.wikipedia.org/wiki/Utente:Elitre_(WMF)/Sandbox_VE?veaction=edit); I got the warning, then tried to save anyway, I apparently managed to but nothing appears in the history.

I suspect this might have something to do with this code in ve.init.mw.Target.js:

'wpStarttime': this.baseTimeStamp,
'wpEdittime': this.startTimeStamp,

Which seems a bit backwards to me...

So I think that:

  • A conflict is always detected when having switched from VE
  • Said conflict is suppressed when Revision::userWasLastToEdit is run for a logged in user, but if they're anonymous then it's not suppressed.

Some of my confusion on this bug was caused by some extra ways MediaWiki can resolve edit conflicts which I hadn't properly taken into account when testing. It looks like swapping those values fixes this bug. Assigning this to me and bumping the milestone forward.

Change 123795 had a related patch set uploaded by Alex Monk:
Fix order of start and base timestamps when switching to the wikitext editor

https://gerrit.wikimedia.org/r/123795

Change 123795 merged by jenkins-bot:
Fix order of start and base timestamps when switching to the wikitext editor

https://gerrit.wikimedia.org/r/123795

I think this is fixed now. If you notice any issues with it (easiest way to test right now is on beta) please reopen

Add Comment