Page MenuHomePhabricator

VisualEditor removes unrecognised media properties on edit
Closed, ResolvedPublic8 Estimated Story Points

Description

See example on Wikipedia article. VE removes upright and thumbtime when the user edits a media with those props. Probably other new media parameter are also automatically removed, if VE doesn't recognize them.

Event Timeline

Rezonansowy raised the priority of this task from to Medium.
Rezonansowy updated the task description. (Show Details)
Rezonansowy added a subscriber: Rezonansowy.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 3 2016, 9:44 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptFeb 3 2016, 9:54 PM

My suggested solution is that VE should not touch things it doesn't understands, like these for example.

Jdforrester-WMF renamed this task from Visual Editor removes some media properties to VisualEditor removes unrecognised media properties on edit.Feb 9 2016, 8:14 PM
Jdforrester-WMF set Security to None.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.
Jdforrester-WMF set the point value for this task to 8.May 2 2016, 4:27 PM
DLynch added a subscriber: DLynch.

Taking a look at it, these properties don't actually reach VE, instead getting lost in the Parsoid phase.

[[File:WMF Strategic Plan Survey.svg|thumb|upright=1.36|right|Wikipedia editor demographics (2008)]]

Gets turned into the following at https://en.wikipedia.org/api/rest_v1/page/html/Wikipedia?redirect=false :

<figure class="mw-default-size mw-halign-right" typeof="mw:Image/Thumb" id="mwARk"><a href="./File:WMF_Strategic_Plan_Survey.svg" id="mwARo"><img resource="./File:WMF_Strategic_Plan_Survey.svg" src="//upload.wikimedia.org/wikipedia/commons/thumb/6/69/WMF_Strategic_Plan_Survey.svg/300px-WMF_Strategic_Plan_Survey.svg.png" data-file-width="535" data-file-height="440" data-file-type="drawing" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/6/69/WMF_Strategic_Plan_Survey.svg/600px-WMF_Strategic_Plan_Survey.svg.png 2x, //upload.wikimedia.org/wikipedia/commons/thumb/6/69/WMF_Strategic_Plan_Survey.svg/450px-WMF_Strategic_Plan_Survey.svg.png 1.5x" height="247" width="300" id="mwARs"/></a><figcaption id="mwARw">Wikipedia editor demographics (2008)</figcaption></figure>

(Note: lack of "upright" or "1.36" making it into that.)

So I'd presume that step one is to either have Parsoid pass unknown properties down the line, or reinsert them when we send the markup back up for conversion into wikitext?

The 2 parameters mentioned above are no longer removed. (test for thumbtime and upright)
I think this task can be closed, unless there are other unrecognized media properties that still trigger the old bug.

Deskana closed this task as Resolved.Apr 26 2018, 11:32 AM
Deskana claimed this task.
Deskana added a subscriber: Deskana.

The 2 parameters mentioned above are no longer removed. (test for thumbtime and upright)
I think this task can be closed […]

Yep!

[…] unless there are other unrecognized media properties that still trigger the old bug.

If examples of those are provided, then the task can be reopened or another task can be filed.

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptApr 26 2018, 11:32 AM