Page MenuHomePhabricator

"TypeError: parsers[j] is undefined" when sorting a table by a certain column
Closed, ResolvedPublic


  1. Go to
  2. Click twice on the "Android" column
  3. Click once in the "Linux" column

Expected behavior
The table would be sorted by that column

Actual result

	"errorMessage": "TypeError: parsers[j] is undefined",
	"url": "",
	"lineNumber": 210,
	"columnNumber": 4,
	"errorObject": {}

from the line

cols.push( parsers[j].format( getElementSortKey( $row[0].cells[j] ), table, $row[0].cells[j] ) );


By the time the error happens, i===0, j===10 and parsers.length===10 (so there is only parsers[0] to parsers[9], and parsers[j] is undefined).

Event Timeline

He7d3r created this task.Jul 13 2015, 7:28 PM
He7d3r raised the priority of this task from to Needs Triage.
He7d3r updated the task description. (Show Details)
He7d3r added a subscriber: He7d3r.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 13 2015, 7:28 PM
TheDJ added a subscriber: TheDJ.Jul 13 2015, 7:30 PM

Yeah, i sort of knew about this problem. Happens when you have incomplete rows in your table.

Change 233168 had a related patch set uploaded (by MatthiasDD):
jquery.tablesorter: Add ability for cells with colspan in tbody

Change 233168 merged by jenkins-bot:
jquery.tablesorter: Add ability for cells with colspan in tbody

TheDJ closed this task as Resolved.Sep 10 2015, 7:22 PM
TheDJ assigned this task to MatthiasDD.
TheDJ removed a project: Patch-For-Review.
TheDJ set Security to None.