Page MenuHomePhabricator

Switching from source to visual editing in mobile web removes all other sections
Closed, ResolvedPublic

Description

Steps to reproduce (courtesy of @suffusion_of_yellow on enwp VP/T):

  1. Find a page with multiple sections, and switch to the mobile view.
  2. Choose a section somewhere in the middle, and click the edit icon.
  3. In you are not already in source editing mode, switch to that mode without changing anything.
  4. Modify the content in some way.
  5. Switch to visual editing mode.
  6. Again, modify the content in some way.
  7. Publish the page.

Details

Related Gerrit Patches:
mediawiki/extensions/VisualEditor : wmf/1.34.0-wmf.4Section switch from wikitext to VE
mediawiki/extensions/VisualEditor : masterSection switch from wikitext to VE

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 11 2019, 9:53 PM
Izno triaged this task as Unbreak Now! priority.May 11 2019, 10:26 PM
Izno added a subscriber: Izno.

This is somewhere between a High and a UBN given how destructive the result is onwiki (and while en.wp has prevention in place via filter, not all wikis will). (I have taken into consideration the Phabricator project management guideline, just to preempt you, Aklapper. :) )

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMay 11 2019, 10:26 PM
Risker added a subscriber: Risker.May 12 2019, 1:31 AM

I think this will be fixed by https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/VisualEditor/+/503651/, but looks like we removed a discard warning too soon.

Change 503651 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Section switch from wikitext to VE

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

Based on this extract from one of our section-blanking filters, it looks like this problem started on around 9 May, and is happening about 40 times per day on enwiki.

Change 503651 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Section switch from wikitext to VE

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

matmarex added a subscriber: matmarex.

Sorry about the issue. We're currently working on allowing section editing in VisualEditor, and on allowing switching between the two editors on mobile (where all wikitext edits are section edits), and it looks like we merged the user interface changes for this before actually merging the backend code that makes it work.

We might want to backport this…

Change 510094 had a related patch set uploaded (by Jforrester; owner: Esanders):
[mediawiki/extensions/VisualEditor@wmf/1.34.0-wmf.4] Section switch from wikitext to VE

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

Change 510094 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.34.0-wmf.4] Section switch from wikitext to VE

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

Mentioned in SAL (#wikimedia-operations) [2019-05-14T12:37:55Z] <jforrester@deploy1001> Synchronized php-1.34.0-wmf.4/extensions/VisualEditor/: Hot-deploy T223023 fix I1b35b28e42 for mobile VE edit section switches (duration: 00m 54s)

hashar added a subscriber: hashar.

And I think the hotfix https://gerrit.wikimedia.org/r/510094 might cause a spam of:

ErrorException from line 599 of /srv/mediawiki/php-1.34.0-wmf.4/extensions/VisualEditor/includes/ApiVisualEditor.php: PHP Notice: Undefined variable: restbaseHeader

Which is T223281

This should be resolved now on Wikipedia (and other wikis). @suffusion_of_yellow Can you confirm this? (Also, how did you create that fancy list?)

From a quick test in my enwp sandbox, this seems to be fixed! Thanks!

@matmarex: Also tried in my sandbox, and it seems to work! And based on the latest data (created by piping variable dumps from an existing abuse filter to a throwaway Perl script), the problem seems to have stopped for everyone else.

hashar closed this task as Resolved.May 15 2019, 4:32 AM
hashar claimed this task.
hashar reassigned this task from hashar to Esanders.