Page MenuHomePhabricator

VisualEditor: [Regression wmf16] Getting "Your edit may have been corrupted – please review before saving" message when page contains gallery/formula
Closed, ResolvedPublic

Description

Screenshot

Steps to reproduce:

Yet Unknown.I am getting it by following no specific steps.


Version: unspecified
Severity: normal

Attached:

Details

Reference
bz62172

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:54 AM
bzimport set Reference to bz62172.
Ryasmeen created this task.Mar 3 2014, 11:47 PM

Steps to reproduce: (found later )

1.Open a page with VE
2.Add a formula or a gallery
3.Save the page

Observed Result:
"Your edit may have been corrupted – please review before saving" appears on the save dialog box

Confirmed on http://en.wikipedia.beta.wmflabs.org/wiki/Editcorrupted?veaction=edit with not actual corruption, but can't reproduce locally.

This is not because of galleries of formulas, but because of Moriel's fixes for default images sizes in the DM. So it manifests only for images with default size.

The corruption occurs because the default image size fixes overwrite Parsoid's width/height (which is reasonable) but then also send the overwritten values back to Parsoid (which is not reasonable). We should store the original values and send those back in the HTML unless the user changed something.

Additionally, the default size fixes are causing us to incorrectly size images whose original size is less than 220px. An 16x16px icon, for instance, is 16x16 even though the default bounding box is 220, because default sizing never grows an image above its original size. In this case Parsoid's width/height are actually correct, but we overwrite that with the default size, and so 16x16px icons end up rendering as 220x220px in VE and look horribly pixelated.

Change 117144 had a related patch set uploaded by Catrope:
Work around DOM corruption for default-sized images

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

Change 117144 merged by jenkins-bot:
Work around DOM corruption for default-sized images

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

verified the fix on test2

Change 117445 had a related patch set uploaded by Catrope:
Work around DOM corruption for default-sized images

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

Change 117445 merged by jenkins-bot:
Work around DOM corruption for default-sized images

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