Page MenuHomePhabricator

Right-aligned images don't rt properly in VE [DOM round-tripping]
Closed, ResolvedPublic

Description

Input wikitext:
[[File:Wiki.png|400px|right|Foo]]

Parsoid HTML:
<figure class="mw-halign-right" typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"400px"},{"ck":"right","ak":"right"},{"ck":"caption","ak":"Foo"}],"cacheKey":"[[File:Wiki.png|400px|right|Foo]]","img":{"h":155,"w":135,"wdset":true},"dsr":[0,33,2,2]}'><a href="./File:Wiki.png" data-parsoid='{"a":{"href":"./File:Wiki.png"},"dsr":[2,null,null,null]}'><img resource="./File:Wiki.png" src="http://upload.wikimedia.org/wikipedia/en/b/bc/Wiki.png" height="155" width="135" data-parsoid='{"a":{"resource":"./File:Wiki.png","width":"135"},"sa":{"resource":"File:Wiki.png","width":"400"}}'></a><figcaption class="mw-figcaption" data-parsoid='{"dsr":[null,31,null,null]}'>Foo</figcaption></figure>

VE HTML without modifications:
<span typeof="mw:Image" data-parsoid="{&quot;optList&quot;:[{&quot;ck&quot;:&quot;width&quot;,&quot;ak&quot;:&quot;400px&quot;},{&quot;ck&quot;:&quot;right&quot;,&quot;ak&quot;:&quot;right&quot;},{&quot;ck&quot;:&quot;caption&quot;,&quot;ak&quot;:&quot;Foo&quot;}],&quot;cacheKey&quot;:&quot;[[File:Wiki.png|400px|right|Foo]]&quot;,&quot;img&quot;:{&quot;h&quot;:135,&quot;w&quot;:135,&quot;wdset&quot;:true},&quot;dsr&quot;:[0,33,2,2]}"><a href="../File:Wiki.png" data-parsoid="{&quot;a&quot;:{&quot;href&quot;:&quot;../File:Wiki.png&quot;},&quot;dsr&quot;:[2,null,null,null]}"><img src="http://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png" resource="../File:Wiki.png" width="135" height="135" data-parsoid="{&quot;a&quot;:{&quot;resource&quot;:&quot;../File:Wiki.png&quot;,&quot;width&quot;:&quot;135&quot;},&quot;sa&quot;:{&quot;resource&quot;:&quot;File:Wiki.png&quot;,&quot;width&quot;:&quot;400&quot;}}"></a></span>

The figure / figcaption changed to span, but no data-mw is set. This causes diffs in quite a few pages including [[Chloroplast]].


Version: unspecified
Severity: major

Details

Reference
bz49837

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:08 AM
bzimport set Reference to bz49837.

https://gerrit.wikimedia.org/r/69586 (Gerrit Change I6bc74973671e7046130278b9658bb8f6f62904a1) | change APPROVED and MERGED [by jenkins-bot]

Fixed in gerrit 69586 which we will deploy this afternoon.