Page MenuHomePhabricator

Unable to keep unsaved changes going from source to VisualEditor mode on a private/non-RESTbase wiki
Closed, ResolvedPublic

Description

Using VisualEditor, I can make a change and without saving switch to source editing. All changes made transfer over.

Going the other way, using source editing, I can make a change and without saving switch to visual editing. I get a confirmation "Cancel | Discard my changes and switch", and if I choose discard, it does discard unsaved changes.

Not sure if this is a bug that this functionality isn't working, or if it never has, and if this is a feature request. I'd love to be able to go both ways.

I do notice that when going from VE to source, it goes to "action=submit&veswitched=1", and gives a preview of changes, so I'm thinking there's an easy path to go this way by VE just submitting the page in preview form. Perhaps there isn't really a way for source mode to send unsaved changes to VE, since VE doesn't have within itself a preview differences functionality.

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 24 2019, 1:29 AM

This feature is not currently available for private wikis. Were you editing on a third-party wiki?

JTannerWMF changed the task status from Open to Stalled.Mar 12 2019, 3:19 PM

Change 507711 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Allow switching with changes in non-RESTBase mode

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

Currently switching from wikitext to visual editor with changes is only enabled if the wiki you're using has RESTBase installed. Without it, switching editors may cause dirty diffs (whitespace changes in parts of the page you did not modify), which are highly annoying for Wikipedia editors, but probably not a big problem on wikis with less need for careful review of changes. Since Wikipedia uses RESTBase, we can probably enable it everywhere.

Esanders assigned this task to matmarex.May 22 2019, 1:09 PM
Esanders renamed this task from Unable to keep unsaved changes going from source to VisualEditor mode to Unable to keep unsaved changes going from source to VisualEditor mode on a private/non-RESTbase wiki.May 24 2019, 5:54 PM

This is now controlled by $wgVisualEditorAllowLossySwitching (defaults to true), and documented here: https://www.mediawiki.org/w/index.php?title=Extension:VisualEditor&diff=3251769&oldid=3148559&diffmode=source

Change 507711 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Allow switching from WTE to VE with changes in non-RESTBase mode

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

matmarex changed the task status from Stalled to Open.May 30 2019, 10:12 PM
matmarex removed a project: Patch-For-Review.
matmarex moved this task from Code review to QA on the VisualEditor (Current work) board.
matmarex moved this task from Inbox to High Priority on the Editing QA board.Jun 12 2019, 4:12 PM
matmarex moved this task from High Priority to Low Priority on the Editing QA board.
marcella edited projects, added Skipped QA; removed Editing QA.Jul 24 2019, 5:21 PM
marcella moved this task from QA to Product owner review on the VisualEditor (Current work) board.
ppelberg closed this task as Resolved.Sep 2 2019, 11:58 PM