Page MenuHomePhabricator

VisualEditor: [Regression] Edit tab points to the oldid not the newid when saving (except for when creating pages)
Closed, ResolvedPublic

Description

After save of page using VisualEditor on beta, and clicking on Edit again (I am on the current page, as the content has been updated), I don't get the latest revision, but the revision I had before (the content switches back to the old version), and getting a warning that I'm not editing the latest version


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

Details

Reference
bz50441

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:52 AM
bzimport set Reference to bz50441.

What url do you go to initially?
After saving and reading the page, what do you see. The version from before you edited or after, and what does the url look like?

When going into edit mode after saving, what does the url look like?

Screen recording of the bug

Attached:

Comment on attachment 12694
Screen recording of the bug

This is how the problem materialize for me, as you see, it jumps back to the previous revision on edit, and then complains it's not the latest revision.

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

Pending a full solution, is there any way that the pink error box can be amended to include something like: "Please click the "Cancel" button, then Refresh/Reload the page and try again. Apologies for this temporary problem - we are working on it."

It's irritating for an experienced editor who has found the work-round, but must be desperately confusing for a new editor who has just made an edit, had an afterthought, and gets that message.

(In reply to comment #6)

Pending a full solution, is there any way that the pink error box can be
amended to include something like: "Please click the "Cancel" button, then
Refresh/Reload the page and try again. Apologies for this temporary problem -
we are working on it."

It's irritating for an experienced editor who has found the work-round, but
must be desperately confusing for a new editor who has just made an edit, had
an afterthought, and gets that message.

The message displayed is editable by any English Wikipedia sysop; this doesn't need any code changes to alter the text, or remove the bright pinkness, but you should discuss it with the community: https://en.wikipedia.org/wiki/MediaWiki:Editingold

We're hoping to get this regression fixed soon; sorry for the inconvenience.

(In reply to comment #7)

(In reply to comment #6)

Pending a full solution, is there any way that the pink error box can be
amended to include something like: "Please click the "Cancel" button, then
Refresh/Reload the page and try again. Apologies for this temporary problem -
we are working on it."

It's irritating for an experienced editor who has found the work-round, but
must be desperately confusing for a new editor who has just made an edit, had
an afterthought, and gets that message.

The message displayed is editable by any English Wikipedia sysop; this
doesn't
need any code changes to alter the text, or remove the bright pinkness, but
you
should discuss it with the community:
https://en.wikipedia.org/wiki/MediaWiki:Editingold

We're hoping to get this regression fixed soon; sorry for the inconvenience.

OK, have raised a suggestion at [[MediaWiki_talk:Editingold#VE_problem]]. If there's any likely timescale for the fixing of this bug, it might be useful to comment there: is "soon" likely to be hours, days, or weeks?!

(In reply to comment #8)

If there's any likely timescale for the fixing of this bug, it might be
useful to comment there: is "soon" likely to be hours, days, or weeks?!

Days. :-) Don't want to promise "tomorrow" if we don't manage to fix it by then, but certainly as soon as we can get it written, tested and deployed.

Figured out the cause:

This revision id for the page is initialised in ve.init.mw.Target from wgCurRevisionId but then never updated.

Which makes me wonder, why are we using that in the first place. Don't we always want to be editing the latest version (except when url has oldid=) even if the latest version is more recent than the version the user is reading (either because the page is cached or because an edit was made while the user was viewing the page).

Actually, though we are indeed initialising for the version the user is reading instead of the latest version (separate bug) we do update this.oldid in mw.ViewPageTarget#onSave based on the data we got from the API.

However the API isn't returning that data, there is no "data.newrevid" returned by ApiVisualEditor.

Change 72070 had a related patch set uploaded by Krinkle:
mw.ViewPageTarget: Only pass oldid if we have to and clear/update it on save

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

Bug 47420 is the same thing that was reopened. One of these two should be merged as a duplicate of the other.

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

Change 72070 merged by jenkins-bot:
mw.ViewPageTarget: Fix incorrect retention of the wrong oldid

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

This is now deployed and appears to be working as expected in production, according to my testing. Marking as fixed. Please re-open if you find otherwise.