Page MenuHomePhabricator

Reference inside template call inside table cell not visible
Closed, ResolvedPublic1 Estimated Story Points

Description

In https://en.wikipedia.org/w/index.php?title=Comparison_of_Scrum_software&oldid=674052633 you can see there is a reference for Trello and Hipchat integration in the 3rd table. However if you switch to Visual Editor, the reference is no longer visible.

This does not occur with the reference for LGPL, which is not part of a template call. The same bug also does not occur in a test I did in my sandbox which does not involve a table cell. So it only seems to occur for references inside template calls inside table cells.

Event Timeline

Greenrd raised the priority of this task from to Needs Triage.
Greenrd updated the task description. (Show Details)
Greenrd subscribed.

The wikitext:

| {{Yes|Yes<ref>Foo</ref>}}

generates

<td style="background:#dfd;" typeof="mw:Transclusion" about="#mwt4" data-parsoid='...'>
	Yes
	<a href="#cite_note-1" style="counter-reset: mw-Ref 1;">
		<span class="mw-reflink-text">[1]</span>
	</a>
</td>

the rule span.mw-reflink-text { display: none; } from ext.cite.style.css then applies and hides the ref rendering. Is this a Parsoid bug?

Actually, this looks like a bug in one of Parsoid's DOM passes.

See the HTML for the first reference

<span about="#mwt5" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-parsoid='{"dsr":[677,822,5,6]}' data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1" style="counter-reset: mw-Ref 1;"><span class="mw-reflink-text">[1]</span></a></span>

vs the second one (which is hidden)

<a href="#cite_note-2" style="counter-reset: mw-Ref 2;"><span class="mw-reflink-text">[2]</span></a>

This one has lost the outer span which is probably what is breaking the CSS.

ssastry triaged this task as Medium priority.Aug 3 2015, 3:03 PM

Test case for Parsoid

{|
| {{Yes|Yes<ref>foo 1</ref>}}
| Yes<ref>foo 2</ref>
|}

Change 228855 had a related patch set uploaded (by Subramanya Sastry):
T107652: Don't strip <ref> span tags in templated <td>-attr scenarios

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

Change 228855 merged by jenkins-bot:
T107652: Don't strip <ref> span tags in templated <td>-attr scenarios

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

ssastry removed a project: Patch-For-Review.
ssastry removed a subscriber: gerritbot.