Last modified: 2011-12-11 00:44:30 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 T34888, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32888 - Tables' headers' sortability attribute is disabled, when a 6-columnn table is inserted into one of its headers.
Tables' headers' sortability attribute is disabled, when a 6-columnn table is...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 31601
  Show dependency treegraph
 
Reported: 2011-12-08 23:54 UTC by athenurlauber
Modified: 2011-12-11 00:44 UTC (History)
2 users (show)

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


Attachments

Description athenurlauber 2011-12-08 23:54:26 UTC
When a table is embedded into the header of a sortable table, and the embedded table has more than five columns, then the main table's headers' sortability attribute is disabled.

If the embedded table's cells are defined as headers, then the sortability attribute is additonally applied to these cells.

I suspect this bug was introduced at the same time the sorting button's appearance was changed to its current "split diamond" design.

An example can be seen here:
http://en.wikipedia.org/wiki/User:Dan_Pelleg/Sandbox/Sortability_bug

This table works as expected, with a 5-columnn table embedded in a header:

{|class="wikitable sortable" width=100%
!h1!!h2!!h3!!h4!!h5
{|align=center
!s1!!s2!!s3
|s4||s5+s6
|}
|-
| || || || ||  
|}

This table doesn't work, with a 6-columnn table embedded in a header:

{|class="wikitable sortable" width=100%
!h1!!h2!!h3!!h4!!h5
{|align=center
!s1!!s2!!s3
|s4||s5||s6
|}
|-
| || || || ||  
|}

http://en.wikipedia.org/wiki/User:Dan_Pelleg/Sandbox/Sortability_bug
Comment 1 athenurlauber 2011-12-09 12:40:12 UTC
I think I've improved my diagnosis:

The bug manifests itself when the embedded table has more columns than the table in which it's embedded.

In other words: the sortability property of headers in the main ("enveloping") table remains in tact as long as the embedded table doesn't have more columns than the table in which it's embedded.

As soon as number of columns in the embedded table is greater, the headers in the main table are no longer rendered as sortable, whereas headers in the embedded table are (although the embedded table is not defined as "sortable" at all).
Comment 2 Brion Vibber 2011-12-09 13:11:37 UTC
Tagging with need-unittest; this'll need some qunit tests to verify a fix.
Comment 3 Derk-Jan Hartman 2011-12-09 22:15:17 UTC
two things:

1: what is the EXPECTED result in both situations ? (not fully clear to me from your report)
2: we actually use this somewhere ? And isn't it a better idea to change that usage in stead perhaps ?

Might be related to the multi row header
Comment 4 Derk-Jan Hartman 2011-12-09 22:39:21 UTC
Fixed in r105727
Comment 5 athenurlauber 2011-12-09 23:16:20 UTC
Ah - fixed? Please translate the technocracy. As far as I can see, nothing has changed. Please (again) take a look here for a demonstartion:

http://en.wikipedia.org/wiki/User:Dan_Pelleg/Sandbox/Sortability_bug

As to your questions (ah - did you read my posts? Did you take a look at the link I provided and at its source?):

1. The expected result is, that columns defined as sortable indeed always be rendered as sortable, insead of losing their sortability if one of their headers happens to contain an embedded table that happens to have more columns than it's "mother".

2. Yes, the reason I found the bug was because a table I'd created suddenly went awry without any edits having been made to it. If it's really necessary, I'll explain why I created this kind of table. Is it really necessary? Roundabout solutions can often be found, is this a reason to leave this silly bug unattended to?.

You can take a look at the "real usage" site here (I've found a roundabout solution for the time being - an additional layer of embedded tables, yuck):

http://he.wikipedia.org/wiki/%D7%A9%D7%95%D7%A8%D7%A9_%D7%9E%D7%97%D7%95%D7%9E%D7%A9#.D7.93.D7.95.D7.92.D7.9E.D7.90.D7.95.D7.AA
Comment 6 Derk-Jan Hartman 2011-12-09 23:26:42 UTC
Yes, fixed in the software. Software doesn't get deployed immediately however.

Yes i did read, but this is a complicated situation, so the more you tell a developer, the better he can figure out what problem you have exactly.

1: so you are only concerned with the sorting capability breaking on the PARENT table right ?

2: Well depends on what you call a bug. If you take a pillow and hit something hard a couple of times, i'm sure you can break the pillow. Is it desirable however to make the pillow out of kevlar for that reason ? For instance fixing this probably negatively affected performance for table on Internet explorer 6. Trade offs are always made.
Comment 7 athenurlauber 2011-12-10 00:10:36 UTC
1. Yes - the embedded table isn't even defined as sortable, and unless it has more columns than its parent, the sortability also isn't inherited. Which is good.

2. Ok, I'll explain: within a sortable table, I have one column that contains tables organizing its contents in a visually clear and consistent structure (this column doesn't need to be sortable). This column's header contains a table too, which parallels the embedded tables' structure, and whose cells can thus refer to their counterparts within the tables listed below. A perfectly reasonable usage.

3. I assume this bug arouses from a logical flaw in programming. If instead of "sticking a band aid" on it you'll figure out the flaw and "cure the infection at the root", I'm sure it won't compromise performance, but will more likely enhance it. Or am I missing something and this isn't a bug at all, but rather a programmer's intentional "compromise", designed to enhance performance but assuming nobody will ever need to embedd a table in a header?

4. As I mentioned (maybe I wasn't clear enough), the bug didn't exist before the sorting button's appearance was changed. A clue to figure out who messed what up back then?
Comment 8 Derk-Jan Hartman 2011-12-10 21:37:33 UTC
1: Ok, then that is fixed now.

2: ok

3: You understand incorrect on all accounts. Doesn't matter :D

4: They are entirely different implementations. They were bound to have some inconsistencies between them. The new one is much more flexible and future proof than the old one.
Comment 9 Derk-Jan Hartman 2011-12-10 21:39:39 UTC
I notice this was reopened..

Closing again as fixed, because the bug is fixed. Deployment towards the english wikipedia, will take a few weeks/months as usual for non-critical bugs.
Comment 10 Derk-Jan Hartman 2011-12-10 22:51:03 UTC
Added a unit test for this problem in r105773
Comment 11 athenurlauber 2011-12-11 00:44:30 UTC
Thanks for attending to the problem and for the information.

Purely out of curiosity: What kind of malprogramming produces such a weird "phenotype"? Embedded non-sortable tables "stealing" sortability away from their mothers by having a larger number of columns?

Could you maybe please try to outline how this works (in non technical terms)?

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


Navigation
Links