Last modified: 2013-08-27 21:53:48 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 T55402, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53402 - Parsoid: named references in table ejects and duplicates content from the table
Parsoid: named references in table ejects and duplicates content from the table
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
DOM (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 14:13 UTC by Chris McKenna
Modified: 2013-08-27 21:53 UTC (History)
2 users (show)

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


Attachments

Description Chris McKenna 2013-08-27 14:13:51 UTC
When editing [[The Legend of Korra (Book 2)]] in VE a reference from the table is ejected and duplicated on save, e.g. https://en.wikipedia.org/w/index.php?title=The_Legend_of_Korra_%28Book_2%29&diff=570312407&oldid=570187078

The problem appears to be some sort of interaction between something in the table and named references.
https://en.wikipedia.org/w/index.php?title=The_Legend_of_Korra_%28Book_2%29&diff=next&oldid=570389041
The earlier version in the above diff works correctly in VE, the later revision does not. 

en.wp user GermanJoe reports that their sandbox testing this happens with any named ref in the table, and doesn't with unnamed references.

My own sandbox testing has been unable to reproduce it with a minimal table.
https://en.wikipedia.org/w/index.php?title=User:Thryduulf/sandbox&diff=570395879&oldid=570395501 

My guess therefore is that its some sort of interaction issue.

It looks possibly related to bug 51217?
Comment 1 ssastry 2013-08-27 15:37:13 UTC
Oh, I have run into this before .. I documented this behavior in an earlier bug report .. if only I can remember how to find that report.  Or maybe it was on the Feedback page?

IIRC, the problem is that the ProdCode parameter to Episode list is also used as the "id" HTML attribute value of a <td> cell in the template, either Episode list itself or other templates that Episode list uses.  So, using anything else besides either a number of a string effectively breaks the HTML generated by the template.  <td id="113<ref name="xyz" />"> no longer parses as a <td>.  For some reason, the PHP parser is able to ignore the error (but once again IIRC, there was a minor HTML diff from the error, but I could be mistaken).  But Parsoid's parse breaks more significantly because it becomes <td id="113<ref name=" and Parsoid is not able to recover from this gracefully.

Note that this only affects named parameters that use the same kind of quotes as the template that uses the ProdId parameter.

I would say that either the template needs fixing or users of Episode list template need to know about how that parameter is being used by the template and constraints on it.

It would be good if someone independently verifies this.
Comment 2 ssastry 2013-08-27 15:40:03 UTC
Correcting couple typos.

(In reply to comment #1)

> besides either a number of a string effectively breaks the HTML generated by

... number *or* a string ...
 
> Note that this only affects named parameters that use the same kind of quotes
> as the template that uses the ProdId parameter.

... uses the *ProdCode* parameter ...
Comment 3 ssastry 2013-08-27 21:53:48 UTC
This is a problem with bad source wikitext -- I am going to close this as resolved-fixed for now.  I've also examined the template and updated the WP:VE/F page here: https://en.wikipedia.org/w/index.php?title=Wikipedia%3AVisualEditor%2FFeedback&diff=570411578&oldid=570410348

Please reopen if anything is needed on the Parsoid end.

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


Navigation
Links