Last modified: 2014-09-28 00:49:07 UTC
Originally reported at http://web.archive.org/web/20111002214029/http://code.pediapress.com/wiki/ticket/831 Article: http://en.wikipedia.org/wiki/Family_of_Barack_Obama PDF: http://en.wikipedia.org/w/index.php?title=Special:Book&bookcmd=render_article&arttitle=Family+of+Barack+Obama&oldid=359784014&writer=rl This is due to http://en.wikipedia.org/wiki/Template:Ahnentafel-compact5 ---- Now it renders, but section 5 is as follows: 5 Genealogical charts 5.1 Ancestries Obama <td rowspan="2> Robinson <td rowspan="2> 5.2 Family trees 6 Distant relations ---- The template got no substantial changes since the original bug report https://en.wikipedia.org/w/index.php?title=Template:Ahnentafel-compact5&diff=578255764&oldid=353776244 Parsoid's output is partly (mostly?) ok: http://parsoid-lb.eqiad.wikimedia.org/enwiki/Family_of_Barack_Obama?oldid=625267347 If the actual graphs are skipped on purpose, perhaps this could be considered a parsoid bug due to the stray td elements visible in its output as well.
Created attachment 16587 [details] Current Parsoid HTML
Yes, please file a bug against Parsoid for the broken output at http://parsoid-lb.eqiad.wikimedia.org/enwiki/Family_of_Barack_Obama?oldid=625267347 The PDF renderer can't be expected to emit good stuff until the Parsoid output is correct.
Line 132 of the template https://en.wikipedia.org/w/index.php?title=Template:Ahnentafel-compact5&action=edit has an unclosed rowspan attribute: ....<td rowspan="{{#if:{{{29|}}}|2|6}}>.... Can someone fix this and retry if it changes anything? It should at the very least get rid of the <td rowspan="2> text there. I dont have edit perms on the template.
https://en.wikipedia.org/w/index.php?title=Template%3AAhnentafel-compact5&diff=627076787&oldid=578255764
Thanks. That didn't fix the rendering itself, but the <td>s are gone at least. To be continued ..
Interestingly enough, if I just take the "wikitext" output from the expanded template and open it in a browser (since most of the "wikitext" is essentially primarily HTML with a few [[..]] and such thrown in), the table renders more or less identically ... So, some of the attributes are getting lost / munged when it goes through the tokenizer.
Wow ... wtf .. https://gerrit.wikimedia.org/r/#/c/155348/ is the culprit. Turns out if I suppress the "delete empty <tr> tags in template content" DOM pass, the table renders properly (at least the snippet of that geneology since the whole page is timing out for me at this coffee sohp with its crappy wifi and internet connection). So, we have to figure out when Tidy removes the "empty" rows and where it is okay and where it is not.
I see the problem. That pass removes rows without any content but doesn't check if it has any html attributes set. Will push a fix.
Change 163039 had a related patch set uploaded by Subramanya Sastry: (Bug 71312) Do not strip empty <tr> nodes if they have html attrs https://gerrit.wikimedia.org/r/163039
Change 163039 merged by jenkins-bot: (Bug 71312) Do not strip empty <tr> nodes if they have html attrs https://gerrit.wikimedia.org/r/163039
Will be deployed monday.