Page MenuHomePhabricator

Editing a page using visual editor removes captions of inline images
Closed, ResolvedPublic

Description

As reported at the German-language Wikipedia's village pump: Steps to reproduce:

  1. Go to Liste öffentlicher Bücherschränke in Nordrhein-Westfalen
  2. Open the page in the source code editor (not NWE, but the regular wikitext editor)
  3. Without changing anything, scroll down and select "Änderungen zeigen"/"Show changes" (the problem also appears when using "Vorschau zeigen"/"Show preview", but the diff makes it more obvious)
  4. Note that there is not a single change to the article
  5. Immediately switch to visual editing using the pen in the upper right-hand corner of the textbox (the problem also appears when switching by clicking the "Bearbeiten"/"Edit" tab)
  6. Observe that "Änderungen veröffentlichen"/"Publish changes" is blue, indicating that a change has been made
  7. Click "Änderungen veröffentlichen"/"Publish changes" and look at the diff:

There should be no changes, but in fact content has been removed.

Note that when switching back to source mode afterwards, there is an error message: "Der Inhalt des Bearbeitungsformulars hat den Server nicht vollständig erreicht. Bitte prüfe deine Bearbeitungen auf Vollständigkeit und versuche es erneut."

Event Timeline

Cirdan created this task.Jul 23 2018, 4:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2018, 4:34 PM
Cirdan updated the task description. (Show Details)Jul 23 2018, 4:35 PM
Cirdan updated the task description. (Show Details)
Cirdan updated the task description. (Show Details)Jul 23 2018, 7:00 PM
Honischboy updated the task description. (Show Details)Jul 23 2018, 7:08 PM
Cirdan updated the task description. (Show Details)Jul 23 2018, 7:31 PM

I've just seen a similar report at https://pl.wikipedia.org/wiki/Wikipedia:Kawiarenka/Kwestie_techniczne#VE_usuwa_podpisy_grafik regarding this edit: https://pl.wikipedia.org/w/index.php?title=Letnie_Grand_Prix_w_skokach_narciarskich_2018&type=revision&diff=53987624&oldid=53985498&diffmode=source

…but in this case, switching editors was not necessary, instead there was a change made in an unrelated part of the page.

The removed content in both cases is captions of inline images (tooltip text, title attribute in HTML).

Note that when switching back to source mode afterwards, there is an error message: "Der Inhalt des Bearbeitungsformulars hat den Server nicht vollständig erreicht. Bitte prüfe deine Bearbeitungen auf Vollständigkeit und versuche es erneut."

This error message is edit_form_incomplete and this might be a separate issue.

I reproduced the issue on a simple page: https://en.wikipedia.org/w/index.php?title=User:Matma_Rex/sandbox&diff=851790370&oldid=851789991&diffmode=source

In this edit, I just typed a space and "test" after the inline image, without touching it.

matmarex renamed this task from Switching to visual editing from page preview or diff removes content to Editing a page using visual editor removes captions of inline images.Jul 24 2018, 4:41 PM
matmarex claimed this task.Jul 24 2018, 5:13 PM

This is caused by the same bug as T198941, and it is already fixed on master with this patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/446575. It will be included in MW 1.32.0-wmf.14, but maybe we should backport it.

Change 447653 had a related patch set uploaded (by Bartosz Dziewoński; owner: Santhosh):
[mediawiki/extensions/VisualEditor@wmf/1.32.0-wmf.13] ve.dm.MWInlineImageNode: Fix undefined data-mw in toDomElements output

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

PerfektesChaos triaged this task as Unbreak Now! priority.Jul 25 2018, 8:39 PM
Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptJul 25 2018, 8:39 PM

Destroying and removing productive contents is a No-Go.

https://de.wikipedia.org/wiki/Spezial:Diff/179446999

Change 447653 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@wmf/1.32.0-wmf.13] ve.dm.MWInlineImageNode: Fix undefined data-mw in toDomElements output

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

Stashbot added a subscriber: Stashbot.

Mentioned in SAL (#wikimedia-operations) [2018-07-25T23:35:02Z] <thcipriani@deploy1001> Synchronized php-1.32.0-wmf.13/extensions/VisualEditor/modules/ve-mw/dm/nodes/ve.dm.MWInlineImageNode.js: SWAT: [[gerrit:447653|ve.dm.MWInlineImageNode: Fix undefined data-mw in toDomElements output]] T198941 T200214 (duration: 00m 57s)

Cirdan lowered the priority of this task from Unbreak Now! to Medium.Jul 26 2018, 3:38 AM

Unbreak Now! is for bugs critical to site operation. This clearly is not, and the fix is already there.

Destroying and removing productive contents is a No-Go.

https://de.wikipedia.org/wiki/Spezial:Diff/179446999

Yes, which is why the problem was addressed urgently, and then backported so that it went live right away rather than waiting for the regular deployments.

Please don't mess with task priorities like this, especially when the team has already taken almost all of the steps to fix the problem.

Deskana closed this task as Resolved.Jul 27 2018, 3:29 PM
Deskana moved this task from QA to Product owner review on the VisualEditor (Current work) board.