Last modified: 2013-12-13 20:14:11 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 T59618, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57618 - Parsoid: Template-generated reference lists are empty
Parsoid: Template-generated reference lists are empty
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-26 20:18 UTC by Roan Kattouw
Modified: 2013-12-13 20:14 UTC (History)
3 users (show)

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


Attachments

Description Roan Kattouw 2013-11-26 20:18:45 UTC
On master:

$ echo "<ref>Foo</ref> {{echo|<references />}}" | node js/tests/parse.js

<body data-parsoid='{"dsr":[0,39,0,0]}'><span about="#mwt3" class="reference" data-mw='{"name":"ref","body":{"html":"Foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"&lt;ref>Foo&lt;/ref>","dsr":[0,14,5,6]}'><a href="#cite_note-1">[1]</a></span> <ol class="references" about="#mwt4" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;references />"}},"i":0}}]}' data-parsoid='{"html":"&lt;ol class=\"references\" typeof=\"mw:Extension/references\" about=\"#mwt6\" data-parsoid=\"{&amp;quot;src&amp;quot;:&amp;quot;&lt;references />&amp;quot;}\">&lt;/ol>","dsr":[15,38,null,null],"pi":[[{"k":"1","spc":["","","",""]}]]}'></ol>
</body>

Note the empty <ol> tag, and the absence of the reference contents ("Foo") in the HTML (other than in the data-mw attribute of the span).
Comment 1 ssastry 2013-11-26 20:26:13 UTC
But, this works:

[subbu@earth lib] echo "<ref>Foo</ref> {{Reflist}}" | node parse.js
<body data-parsoid='{"dsr":[0,27,0,0]}'><span about="#mwt2" class="reference" data-mw='{"name":"ref","body":{"html":"Foo"},"attrs":{}}' id="cite_ref-1-0" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"src":"&lt;ref>Foo&lt;/ref>","dsr":[0,14,5,6]}'><a href="#cite_note-1">[1]</a></span> <div class="reflist " style=" list-style-type: decimal;" about="#mwt3" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"Reflist","href":"./Template:Reflist"},"params":{},"i":0}}]}' data-parsoid='{"stx":"html","dsr":[15,26,null,null],"pi":[[]]}'>
<ol class="references" typeof="mw:Extension/references" about="#mwt5" data-parsoid='{"src":"&lt;references group=\"\">&lt;/references>"}' data-mw='{"name":"references","attrs":{}}'><li about="#cite_note-1" id="cite_note-1" data-parsoid="{}"><span rel="mw:referencedBy"><a href="#cite_ref-1-0">↑</a></span> Foo</li></ol></div>
</body>
Comment 2 ssastry 2013-11-26 20:29:40 UTC
echo "<ref>Foo</ref> {{echo|<div><references></references></div>}}" | node parse.js works
echo "<ref>Foo</ref> {{echo|<references></references>}}" | node parse.js doesn't work
Comment 3 Gabriel Wicke 2013-11-26 20:38:45 UTC
This also seems to affect the case where <references/> is in the template itself rather than a template parameter: 

http://parsoid.wmflabs.org/enwiki/User%3AGWicke%2FTest?oldid=583434444
Comment 4 Roan Kattouw 2013-11-26 20:44:46 UTC
[20:42]	subbu	RoanKattouw, gwicke ah .. so, when <references /> is hte top-level node, our template encap/ fragment unpacker code deletes the mw:Extension/references typeof which is what is used to generate references.
[20:42]	subbu	it just adds the mw:Transclusion typeof to the <ol> in that case
[20:43]	subbu	which is why <div> or any other top-level wrapper fixes the problem.
[20:43]	subbu	should be simple to fix.
Comment 5 Gerrit Notification Bot 2013-11-26 21:09:40 UTC
Change 97839 had a related patch set uploaded by Subramanya Sastry:
(BUG 57618) Bug fix in dom-fragment unpacking of transcluded extensions

https://gerrit.wikimedia.org/r/97839
Comment 6 Gerrit Notification Bot 2013-11-26 23:09:45 UTC
Change 97839 merged by jenkins-bot:
(Bug 57618) Bug fix in dom-fragment unpacking of transcluded extensions

https://gerrit.wikimedia.org/r/97839
Comment 7 Gerrit Notification Bot 2013-12-13 19:53:39 UTC
Change 101267 had a related patch set uploaded by GWicke:
Merge "(Bug 57618) Bug fix in dom-fragment unpacking of transcluded extensions"

https://gerrit.wikimedia.org/r/101267
Comment 8 Gerrit Notification Bot 2013-12-13 19:55:01 UTC
Change 101313 had a related patch set uploaded by GWicke:
(Bug 57618) Bug fix in dom-fragment unpacking of transcluded extensions

https://gerrit.wikimedia.org/r/101313
Comment 9 Gerrit Notification Bot 2013-12-13 19:57:32 UTC
Change 101267 merged by GWicke:
Merge "(Bug 57618) Bug fix in dom-fragment unpacking of transcluded extensions"

https://gerrit.wikimedia.org/r/101267
Comment 10 Gerrit Notification Bot 2013-12-13 19:57:34 UTC
Change 101313 merged by GWicke:
(Bug 57618) Bug fix in dom-fragment unpacking of transcluded extensions

https://gerrit.wikimedia.org/r/101313

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


Navigation
Links