Page MenuHomePhabricator

"wikitable sortable mw-collapsible mw-collapsed" is no longer displaying sortable headings when there are two tr lines with th elements
Closed, ResolvedPublic

Description

This problem occurs on https://en.wikipedia.org/

I discovered that some collapsed sortable wikitables that worked correctly on 16 July 2020 (and I believe on 3 August) but on 9 October 2020 no longer showing the sortable headings.

The error occurs in both Safari 14.0 and Firefox 81.0.1 on the Macintosh System 10.14.6. I do not possess the ability to check if it occurs on other browsers or operating systems.

An example of this is the collapsed sortable wikitable in the Languages section of https://en.wikipedia.org/wiki/Allahabad_district

  1. It does not display the sortable headings when you click on show (though it did when the table was created on 15-16 July 2020, and I am fairly certain that it did when the table was modified on 3 August 2020)
  1. If you change class="wikitable sortable mw-collapsible mw-collapsed" to class="wikitable sortable mw-collapsible", then the sortable column headings are displayed.

Event Timeline

Toddy1 created this task.Oct 9 2020, 12:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 9 2020, 12:50 PM

Note that there are two separate table rows (<tr>) which both include column header items (<th>) so the second <tr> gets display: none here:

{|class="wikitable sortable mw-collapsible mw-collapsed" 
|- style="vertical-align:top;"
! colspan=4| Title for this table spanning across all columns
|- style="vertical-align:top;"
! Mother tongue code
! Mother tongue
|- style="vertical-align:top;"
|| 1234 || Assamese
|- style="vertical-align:top;"
|- 
|}
Aklapper renamed this task from "wikitable sortable mw-collapsible mw-collapsed" is no longer displaying the sortable headings to "wikitable sortable mw-collapsible mw-collapsed" is no longer displaying sortable headings when there are two tr lines with th elements.Oct 9 2020, 1:23 PM

It actually worked correctly for me the first time I viewed the page (I was very confused what this issue is about), and then I got the issue after refreshing the page. This is making me thing this depends on the loading order of some scripts. Did we manage to break T64878 again?

It actually worked correctly for me the first time I viewed the page (I was very confused what this issue is about), and then I got the issue after refreshing the page. This is making me thing this depends on the loading order of some scripts. Did we manage to break T64878 again?

We indeed did. This is caused by rMWafc2517bd13b: Move activating of makeCollapsible out of 'mediawiki.page.ready' (https://gerrit.wikimedia.org/r/c/mediawiki/core/+/503101), which doesn't initialize sortable and collapsible tables in the right order.

Change 633759 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] Revert "Move activating of makeCollapsible out of 'mediawiki.page.ready'"

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

matmarex claimed this task.Oct 13 2020, 8:35 PM

Change 633759 merged by jenkins-bot:
[mediawiki/core@master] Revert "Move activating of makeCollapsible out of 'mediawiki.page.ready'"

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

matmarex closed this task as Resolved.Oct 20 2020, 4:49 AM

Patch will be deployed this week, 20-22 October, per the usual schedule.