Page MenuHomePhabricator

page content is nuked when source-editing a section, switching to VE, and saving
Closed, DuplicatePublic

Description

(probably a dupe, but i did not find a report, when looking for "section edit")

Recently, VE team added switching from source-edit to visual edit (kudos!)

there is (at least) one dangerous caveat.

REPRODUCTION STEPS

  1. select an article with sections
  2. select "edit source" in one of the sections
  3. while in wikieditor, select "edit" from the top menu, or from wikieditor toolbar
  4. at this point, you should find yourself in VE, with only the selected section. ttbomk, this is the only way to convince VE to edit a section (selecting "edit" from the section header opens the whole article)
  5. make some changes and save.

WHAT IS EXPECTED
changes are saved

ACTUAL OBSERVED RESULT
modified section replaces the page content, nuking anything outside this section

this, actually, brings me to an old request: i was told long ago that teaching VE to edit a single section is a very difficult task. this "accident" demonstrate that this very difficult task was actually somehow executed (maybe unintentionally).
can we exploit this accidental success and *really* teach VE to truly, intentionally, do a section edit?
(note that the "Page Options" menu should be disabled in section-editing mode, and prolly some more minor changes should be made to the editing logic).

as a stopgap, switching to VE should be disabled when editing a section (unfortunately, this will render "switching to VE" almost useless - vast majority of wikieditor edits are in section-edits, as far as i can see).

Event Timeline

Kipod raised the priority of this task from to Needs Triage.
Kipod updated the task description. (Show Details)
Kipod added a project: VisualEditor.
Kipod subscribed.
Kipod set Security to None.
Kipod triaged this task as Unbreak Now! priority.Nov 23 2015, 8:50 PM