Last modified: 2014-02-28 23:04:39 UTC
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:''' * Navigate to https://en.wikipedia.org/w/index.php?title=User:Excirial/Playground/Content&oldid=562754871 (Historical revision of my sandbox) * Edit the page in the Visual Editor. You will immediately notice that the template isn't correctly displayed. * Enter the template setting screen and just select "Apply Settings". 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.
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 http://parsoid.wmflabs.org/en/User:Excirial/Playground/Content?oldid=562754871 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?