Last modified: 2012-11-16 22:19:56 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 T44097, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42097 - Tablesorter hangs browsers on page load
Tablesorter hangs browsers on page load
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.21.x
All All
: High critical (vote)
: 1.21.0 release
Assigned To: Nobody - You can work on this!
http://fi.wikipedia.org/w/index.php?t...
:
Depends on:
Blocks: 31601
  Show dependency treegraph
 
Reported: 2012-11-14 11:19 UTC by Niklas Laxström
Modified: 2012-11-16 22:19 UTC (History)
8 users (show)

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


Attachments

Description Niklas Laxström 2012-11-14 11:19:10 UTC
The page http://fi.wikipedia.org/wiki/Suomen_hallitus hangs in Chrome and Firefox soon after opening.

Firefox gives the following culprit as unresponsive script when debug=true: http://bits.wikimedia.org/static-1.21wmf3/resources/jquery/jquery.tablesorter.js:920
Comment 1 Nemo 2012-11-14 11:52:57 UTC
Switched URL to permanent link: I've made the table non-sortable because it crashed my browsers.
Comment 2 Andre Klapper 2012-11-14 13:47:26 UTC
Confirming with Firefox 16.0.2; wondering how many pages are affected by this.
Comment 3 Andre Klapper 2012-11-14 14:03:12 UTC
Also hangs Epiphany 3.4 (WebKit based) and Konqueror (KHTML) 4.8.5.
Opera 12.02 works fine here.
Comment 4 Bartosz Dziewoński 2012-11-14 20:10:22 UTC
Same happens on my Opera 12.10 on the linked page on fi.wiki.

By stepping through the code with the debugger, I was able to pinpoint the hang to the following place (currently being lines 610 and 611 in git master):

// initially build the cache for the tbody cells (to be able to sort initially)
cache = buildCache( table );

The buildCache() function contains a pretty straightforward for loop, so it might be something bigger.

The gerrit change https://gerrit.wikimedia.org/r/#/c/32593/ might help alleviate the issue: at the very least it defers the buildCache() call to after the user attempts to sort the table (and not on the page load), and just might magically fix the issue (but I didn't test it).
Comment 5 Bartosz Dziewoński 2012-11-14 20:27:13 UTC
So I identified the root cause.

The 'date' parser assumed all wikis use wgDefaultDateFormat that is either 'mdy' or 'dmy', but this is not the case; for example fi.wikipedia uses 'fi normal'. Therefore the correct value was not set, a string was not changed to an array, and a loop that assumed an array would be present hanged forever.

Submitted a stopgap fix as Gerrit change #33417; it would be nice to get it merged and deployed quickly.
Comment 6 Brad Jorsch 2012-11-14 21:01:15 UTC
Patch merged.
Comment 7 Niklas Laxström 2012-11-15 07:17:47 UTC
Can someome also deploy it?
Comment 8 Pxos 2012-11-16 11:37:29 UTC
(In reply to comment #6)
> Patch merged.

The problem remains the same.
Comment 9 Nemo 2012-11-16 12:09:30 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Patch merged.
> 
> The problem remains the same.

Yes Pxos, as Nikerabbit said someone should also deploy it, otherwise it will go live presumably with 1.21wmf5 on Wednesday, December 5 for fi.wiki... https://www.mediawiki.org/wiki/MediaWiki_1.21/Roadmap
Comment 10 Pxos 2012-11-16 19:56:34 UTC
There is another problem with this new sortable as well. It used to understand the special separate rows inside the tables but now it doesn't.

Formerly http://fi.wikipedia.org/w/index.php?title=Luettelo_rikoksista_tuomituista_kansanedustajista&oldid=12344892 this page had the correct layout even when it was sortable. Now the rows are not displayed properly when the table is sorted.
Comment 11 Brad Jorsch 2012-11-16 19:57:57 UTC
(In reply to comment #10)
> There is another problem with this new sortable as well.

Please file new bugs as new bugs, instead of attaching a comment to old, closed bugs. Thanks.
Comment 12 Rob Lanphier 2012-11-16 22:19:56 UTC
Roan just backported and deployed, so this should be fixed in production.

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


Navigation
Links