Page MenuHomePhabricator

VisualEditor: Generated blocks that create images directly aren't converted to use MW's skin
Open, MediumPublic


It seems that the visual editor can glitch a bit when it initially renders a template. Yet when the template is altered without changes this is corrected. (Firefox 22, Mono skin)

'''Steps to reproduce:'''

Once that is done, the template is rendered correctly. Note that the same template was initially added trough the visual editor itself and displayed just fine. Only when you open an already saved page it seems to glitch a bit (Until the settings are applied without change - somehow that corrects it). The page reports no changes after applying, so it seems this is just a rendering issue.

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:42 AM
bzimport set Reference to bz50723.
Excirial created this task.Jul 4 2013, 7:38 AM

This is an artefact of VisualEditor using Parsoid to render HTML originally, but the MediaWiki PHP parser for updates. The HTML outputted by the two are normally very similar, except for images - which, until we switch the PHP parser our for Parsoid for rendering read HTML, which will involve re-writing the entire skins system, amongst other minor issues. (See for the HTML returned to VisualEditor - note the use of <figure> rather than <div class="thumb"> etc.)

This is an image that's created by a template, so we're not re-drawing it; clearly in this case we should. Is this a special case for items that are 'typeof="mw:Transclusion mw:Image/Frame"', or should we be traversing the template tree for all images inside generated blocks?