Page MenuHomePhabricator

Templates that create part (but not all) of a table cell don't work
Closed, ResolvedPublic

Description

Screenshot

See screenshot; Windows 7, Firefox 21.0, on https://en.wikipedia.org/wiki/Rage_Against_the_Machine?veaction=edit


Version: unspecified
Severity: major
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50589

Attached:

CSS_stylings.png (675×1 px, 37 KB)

Details

Reference
bz50366

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:46 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz50366.
  • Bug 50532 has been marked as a duplicate of this bug. ***

The issue is normally something of this form:

{|

{{style-and-cell}}
}

The transclusion returns some attributes and possibly table content.

This cannot easily be parsed in Parsoid while also retaining round-trip information. And even if we could, this would be very hard to represent in HTML so that the VisualEditor can present a sensible user interface for it. So this will remain a limitation of Parsoid.

This issue can however be avoided by changing the template to return the entire table cell including the leading pipe:

{|
{{style-and-cell}}

}

with {{style-and-cell}} containing:

style="the style"The cell content

(In reply to comment #4)

This cannot easily be parsed in Parsoid while also retaining round-trip
information. And even if we could, this would be very hard to represent in
HTML so that the VisualEditor can present a sensible user interface for it. So
this will remain a limitation of Parsoid.

I'd like to know how many pages are affected by this bug across Wikimedia wikis before it's marked wontfix. Re-opening this for now.

I don't have precise figures right now, but know enough to be sure that a bot will be needed. This bot pass should also fix some other issues listed in http://www.mediawiki.org/wiki/Parsoid/limitations. Do you know a bot author who might be potentially interested in a task like this? We have it on our TODO list, but did not have the time to tackle it before the release.

  • Bug 50567 has been marked as a duplicate of this bug. ***
  • Bug 50589 has been marked as a duplicate of this bug. ***

kwwilliams wrote:

50589 has been marked as a duplicate of this bug. I'm certain it's related, but I'm not certain it's a duplicate. *If* it is a duplicate, marking it as "wontfix" isn't an acceptable answer.

singlechart *does* return the leading | or !, depending on whether it has been ask to generate a row or a header row. It generates two row cells, separated by a |.

Bug 50589 is a different issue, so I reopened it and added detail there.

FYI, we are considering a post-processing work-around in Parsoid that lets this class of templates render as expected, but might not let users edit those templated cells.

Our longer-term goal is to move towards more self-contained templates. This won't happen over night, and we'll need the help of the editor community and bot authors.

Similar hack, but now on the table itself, instead of a table cell. See the Infobox of WikiProject Aircraft:

https://en.wikipedia.org/wiki/BAC_One-Eleven

This bug was raised five months earlier.

  • This bug has been marked as a duplicate of bug 44498 ***