Last modified: 2014-09-28 00:49:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73312, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71312 - {{ahnentafel-compact5}} gives rubbish output on PDF
{{ahnentafel-compact5}} gives rubbish output on PDF
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Parsoid Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-25 16:52 UTC by Nemo
Modified: 2014-09-28 00:49 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Current Parsoid HTML (1.55 MB, text/html)
2014-09-25 16:53 UTC, Nemo
Details

Description Nemo 2014-09-25 16:52:15 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.
Comment 1 Nemo 2014-09-25 16:53:48 UTC
Created attachment 16587 [details]
Current Parsoid HTML
Comment 2 C. Scott Ananian 2014-09-25 17:51:46 UTC
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.
Comment 3 ssastry 2014-09-25 20:31:21 UTC
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.
Comment 5 ssastry 2014-09-25 21:05:02 UTC
Thanks. That didn't fix the rendering itself, but the <td>s are gone at least. To be continued ..
Comment 6 ssastry 2014-09-25 21:20:13 UTC
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.
Comment 7 ssastry 2014-09-25 21:38:01 UTC
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.
Comment 8 ssastry 2014-09-25 21:43:44 UTC
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.
Comment 9 Gerrit Notification Bot 2014-09-25 22:02:45 UTC
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
Comment 10 Gerrit Notification Bot 2014-09-25 22:13:50 UTC
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
Comment 11 ssastry 2014-09-28 00:49:07 UTC
Will be deployed monday.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links