Page MenuHomePhabricator

Switching from a WT section edit to VE only switches with the wikitext of the section, not the article
Closed, ResolvedPublic1 Estimated Story Points

Description

These actions caused the whole article content to be deleted except for one section:

  • "Edit Source" on a section
  • Click "Edit" at the top to switch to Visual Editor
  • Edit the section and Save
    • The article is now shown as "Section", in a non-edit mode
  • When attempting to navigate away after saving, the "data will be lost" dialog is shown, which is confusing because the page has already been saved
  • The result was a complete erasing of the article, as seen here.

Event Timeline

Yurik raised the priority of this task from to Needs Triage.
Yurik updated the task description. (Show Details)
Yurik added a project: VisualEditor.
Yurik added subscribers: Yurik, Jdforrester-WMF.
Jdforrester-WMF renamed this task from Loss of article content if editing a section to Switching from a WT section edit to VE only switches with the wikitext of the section, not the article.Nov 4 2015, 4:11 PM
Jdforrester-WMF assigned this task to Krenair.
Jdforrester-WMF triaged this task as High priority.
Jdforrester-WMF set Security to None.
Jdforrester-WMF edited a custom field.

Change 250987 had a related patch set uploaded (by Alex Monk):
Don't allow keeping changes when switching from wikitext *section* editing

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

Change 250987 merged by jenkins-bot:
Don't allow keeping changes when switching from wikitext *section* editing

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

Change 250992 had a related patch set uploaded (by Jforrester):
Don't allow keeping changes when switching from wikitext *section* editing

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

Change 250992 merged by jenkins-bot:
Don't allow keeping changes when switching from wikitext *section* editing

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

Change 254337 had a related patch set uploaded (by Alex Monk):
Prevent switching from unedited section directly into VE

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

Change 254337 merged by jenkins-bot:
Prevent switching from unedited section directly into VE

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

As far as i could see, the existing patch is a stopgap rather than a solution.

It's good to have a stopgap, but it would be much better to have a real solution.

real solution will have the following:

  1. allow real "section edit" in VE (i.e., when pressing "edit" on a section header, open *only* this section in VE. the current, buggy behavior demonstrates that it's perfectly doable: section editing using wikieditor and switching to VE demonstrates the desired behavior (with one obvious problem - saving nukes the page instead of merging the section changes into the existing page) )
  2. re-allow free switching between wikieditor and VE, with "keep changes" for section edit
  3. make sure that when using "section edit", VE disables the "page options" menu. there may be other items that should be disabled in section-edit mode.

peace.

T117716: Be able to switch to VisualEditor after starting to edit a section without losing edits is about being able to do that kind of section switching properly. Focus of this task is to prevent accidental removal of most of the page, which is much higher priority.

Change 255046 had a related patch set uploaded (by Jforrester):
Prevent switching from unedited section directly into VE

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

Change 255046 merged by jenkins-bot:
Prevent switching from unedited section directly into VE

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