Parsoid occasionally serialises new images as figure class="default size" inserted in a caption
Open, NormalPublic0 Story Points

Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF raised the priority of this task from to Normal.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 26 2016, 8:08 PM
cscott added a subscriber: cscott.Jan 26 2016, 8:20 PM

This looks to me like a VE bug -- it looks like somehow VE is generating something very similar to:

<figure class="mw-default-size" role="presentation">[./File:Tara_ghrah.jpg <img src="//upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Tara_ghrah.jpg/220px-Tara_ghrah.jpg" width="220" height="165" resource="./File:Tara_ghrah.jpg" alt="village view " data-file-width="720" data-file-height="540" data-file-type="bitmap" role="presentation" />]<figcaption href="Category:All articles lacking sources">tara garh</figcaption></figure>

instead of (what I'd expect):

<figure typeof="mw:Image" class="mw-default-size">
 <a href="./File:Tara_ghrah.jpg">
  <img resource="./File:Tara_ghrah.jpg " src="//upload.wikimedia.org/wikipedia/commons/thumb/e/eb/Tara_ghrah.jpg/220px-Tara_ghrah.jpg"
       width="220" height="165">
 </a>
 <figcaption>tara garh</figcaption>
</figure>

In particular:

  • The typeof the <figure> tag is missing.
  • The <a> tag underneath <figure> may be missing (although possibly it is being serialized as an external link, leading to the [./File:Tara_ghrah.jpg ...] in the wikitext.
  • The <figcaption> has an href attribute -- this ought to be ignored, and thus harmless, but note that the href *also* appears to have an unescaped colon.
  • Dunno where all the role="presentation" are coming from, but they should be harmless.

I'm guessing the first of these (the missing typeof) is actually the root cause. The href in the figcaption might hint that category tags in the caption might be involved somehow? But I'm pretty certain that what we're seeing is Parsoid attempting to do its best to render bogus HTML given to it. I could be wrong, of course.