Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using saveSort or sortList #346

Closed
adun50 opened this issue Jun 28, 2013 · 5 comments
Closed

Error when using saveSort or sortList #346

adun50 opened this issue Jun 28, 2013 · 5 comments
Labels

Comments

@adun50
Copy link

adun50 commented Jun 28, 2013

Using latest version 2.10.8, widget to enable saveSort, and using jQuery 1.8.3 but keep getting this error message:

TypeError: Cannot read property '0' of undefined on line 609

My config is like this:

$('#myTable').tablesorter({
  delayInit: true,
  dateFormat: 'ddmmyyyy', 
  headers: 
  {
    0:{sorter:false},
    3:{sorter:'shortDate'},
    4:{sorter:'shortDate'},
    5:{sorter:'shortDate'},
    6:{sorter:false}
  }
});

And it will use either sortList: [[3,0]] or widgets: ['saveSort]

@thezoggy
Copy link
Collaborator

can you create a jsfiddle? make sure you are using a browser with localStorage capable (not in incognito mode)

@thezoggy
Copy link
Collaborator

http://jsfiddle.net/abkNM/1009/

working fine for me...

@adun50
Copy link
Author

adun50 commented Jul 1, 2013

Here you go:

http://jsfiddle.net/t6XNL/3/

I can see that everything is being saved into localStorage on the first sort. Refresh the page and the error appears in the console.

@thezoggy
Copy link
Collaborator

thezoggy commented Jul 1, 2013

on your jsfiddle with debug on i see:

the multisort function throw the error:

TypeError: tc.cache is undefined
http://mottie.github.com/tablesorter/js/jquery.tablesorter.js
Line 609

this would cause multiple column sorting not to work.

digging into why tc.cache would be undefined now

@Mottie
Copy link
Owner

Mottie commented Sep 29, 2013

This does look like a bug. I'll get this fix out in the next update once I've caught up with everything 😵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants