Page MenuHomePhabricator

section edit can remove all other text when browser restore editform
Closed, ResolvedPublic

Description

I have seen that a edit of a section[1] was removing all the other text on that page except the text of the section. The user say this also and repaired that page and leave the note in edit summary, that he got a http status 503 on the first save. I asume that he than ticked back in the browser and saved again (or only hit reload?), which destroyed the whole page, because that recover of the editform missed some information.

I have seen this multiply times and all people wrotes about a error and than resubmit the form. I have no idea, which information is missing in the editform here. Maybe somebody has a idea.

[1] http://de.wikipedia.org/w/index.php?title=Benutzer_Diskussion:Stefan_K%C3%BChn&diff=prev&oldid=126838549
[2] http://de.wikipedia.org/w/index.php?title=Benutzer_Diskussion:Stefan_K%C3%BChn&diff=next&oldid=126838549


Version: 1.23.0
Severity: major

Details

Reference
bz60744
Related Changes in Gerrit:

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:04 AM
bzimport set Reference to bz60744.
bzimport added a subscriber: Unknown Object (MLST).

cvanca wrote:

Steps to reproduce:

0) English Wikipedia (not using Visual Editor)

  1. Instead of editing the whole article, click "edit" link on a section only.
  1. Crash the browser (in my case Firefox 26).
  1. Restart the browser - the edited area of an article will not apply to the selected section but instead will apply to the whole article.
  1. Saving changes will therefore result into removing all data except for the selected section, see example below.

E.g.:
https://en.wikipedia.org/w/index.php?title=Tourism_in_Tamil_Nadu&diff=594673990&oldid=593730355

db: Which browser do yo use?
Problem itself is confirmed hence changing status, but it's not clear to me whether there is anything that can be done server side or if this a browser issue.

(In reply to Andre Klapper from comment #2)

db: Which browser do yo use?

I have only see the edits on my watchlist. I have not a problem with this myself. But for another case as from the links here (a half year or so), I read about a FireFox.

Tried to reproduce but failed:

Try to crash the browser on preview or "show changes", than the url is action=submit and can make more trouble.

The text in the section should be changed before, FireFox mostly recover this changed text than.

This can also happen when restarting Firefox to install updates.

It can be easily reproduced without restarting/crashing the browser now, since Firefox added an "Unload Tab" feature:

  1. Open the wikitext editor for a page section
  2. Type some text
  3. Click "Show preview" or "Show changes"
    • Make sure you disabled live preview in preferences – "Show preview without reloading the page"
  4. Right-click on the browser tab and click "Unload Tab"
  5. Switch back to the unloaded tab, which will cause it to be reloaded
  6. Click "Show changes"
    • The preview of changes will show you deleting all sections other than the one you are editing

Change #1193813 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[mediawiki/core@master] EditPage: Preserve query parameters in form action

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

We should probably put this in Tech News. I feel like this regularly comes up on village pumps, sometimes people think the issue has something to do with edit conflicts. The change also makes it easier to preview changes on other skins/languages (T24029, T155097). And it may also have some effect on gadgets that act on the edit form, although I hope that is unlikely.

@jhsoby If you have any wording suggestions, I'd love them, otherwise I'll come up with something.

Suggested wording:

When you use the "Show preview" or "Show changes" buttons in the wikitext editor, certain URL parameters like useskin, uselang and section will now be carried over. This should also reduce the likelyhood of accidentally overwriting a page with the content of one section in case the browser crashes while previewing a change.

Of course, feel free to edit, improve or replace as you see fit. :-)

Change #1193813 merged by jenkins-bot:

[mediawiki/core@master] EditPage: Preserve query parameters in form action

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

matmarex assigned this task to jhsoby.