Parsoid occasionally serialises new images as figure class="default size" inserted in a caption
Closed, ResolvedPublic0 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="//" 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="//"
       width="220" height="165">
 <figcaption>tara garh</figcaption>

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.

ssastry moved this task from Backlog to html2wt on the Parsoid board.Dec 18 2017, 9:50 PM
Arlolra closed this task as Resolved.Feb 16 2018, 12:01 AM
Arlolra claimed this task.
Arlolra added a subscriber: Arlolra.

Please reopen if there're still cases of this bug.

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptFeb 16 2018, 12:01 AM