{"action":"created","issue":{"url":"https://api.github.com/repos/Mottie/tablesorter/issues/820","labels_url":"https://api.github.com/repos/Mottie/tablesorter/issues/820/labels{/name}","comments_url":"https://api.github.com/repos/Mottie/tablesorter/issues/820/comments","events_url":"https://api.github.com/repos/Mottie/tablesorter/issues/820/events","html_url":"https://github.com/Mottie/tablesorter/pull/820","id":57717196,"number":820,"title":"Bug fix: make config.cache indexation corresponding config.$tbodies","user":{"login":"prijutme4ty","id":814984,"avatar_url":"https://avatars.githubusercontent.com/u/814984?v=3","gravatar_id":"","url":"https://api.github.com/users/prijutme4ty","html_url":"https://github.com/prijutme4ty","followers_url":"https://api.github.com/users/prijutme4ty/followers","following_url":"https://api.github.com/users/prijutme4ty/following{/other_user}","gists_url":"https://api.github.com/users/prijutme4ty/gists{/gist_id}","starred_url":"https://api.github.com/users/prijutme4ty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prijutme4ty/subscriptions","organizations_url":"https://api.github.com/users/prijutme4ty/orgs","repos_url":"https://api.github.com/users/prijutme4ty/repos","events_url":"https://api.github.com/users/prijutme4ty/events{/privacy}","received_events_url":"https://api.github.com/users/prijutme4ty/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mottie/tablesorter/labels/Enhancement","name":"Enhancement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-02-15T04:17:16Z","updated_at":"2015-02-17T17:24:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Mottie/tablesorter/pulls/820","html_url":"https://github.com/Mottie/tablesorter/pull/820","diff_url":"https://github.com/Mottie/tablesorter/pull/820.diff","patch_url":"https://github.com/Mottie/tablesorter/pull/820.patch"},"body":"I've faced a bug with config.cache numeration. It's inconsistent with numeration of config.$tbodies when there're infoOnly tbodies. Namely, c.$tbodies doesn't include info blocks. while c.cache do include empty objects for such tbodies. It caused problems in many widgets (formatter, grouping, chart). I found it when runned formatter on a table with several info-tbody separators and it formatted only a half of a table.\r\n\r\nReason is that widgets typically iterate over config.$tbodies which doesn't include infoOnly blocks but use the same index for caching.\r\n\r\nI found you've already done several bugfixes to workaround this behavior (see fixes for #568, #264 and commit https://github.com/Mottie/tablesorter/commit/638d070f3ad3c1ead30c060a7fb5a440546f994e) which became unnecessary now so were reverted in this commit.\r\n\r\n$.tablesorter.css.info is now unused (it was used once in guard-condition (js/jquery.tablesorter.widgets.js:1180), check if it's ok to remove that usage) so was removed.\r\n\r\nSome variables were renamed along the code, some unused variables were removed.\r\n\r\nI've tried to find all occurences of `cache` and verify that this patch will not break anything, but I ask you to inspect whether I considered all the consequences. I still find my knowledge of tablesorter internals as superficial.\r\n\r\np.s. I recommend to check difference in code using `git show --ignore-space-change` because removal of unnecessary conditions caused shifting left without any changes of large code blocks inside those conditions."},"comment":{"url":"https://api.github.com/repos/Mottie/tablesorter/issues/comments/74709770","html_url":"https://github.com/Mottie/tablesorter/pull/820#issuecomment-74709770","issue_url":"https://api.github.com/repos/Mottie/tablesorter/issues/820","id":74709770,"user":{"login":"TheSin-","id":1868661,"avatar_url":"https://avatars.githubusercontent.com/u/1868661?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSin-","html_url":"https://github.com/TheSin-","followers_url":"https://api.github.com/users/TheSin-/followers","following_url":"https://api.github.com/users/TheSin-/following{/other_user}","gists_url":"https://api.github.com/users/TheSin-/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSin-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSin-/subscriptions","organizations_url":"https://api.github.com/users/TheSin-/orgs","repos_url":"https://api.github.com/users/TheSin-/repos","events_url":"https://api.github.com/users/TheSin-/events{/privacy}","received_events_url":"https://api.github.com/users/TheSin-/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T17:24:07Z","updated_at":"2015-02-17T17:24:07Z","body":"I am currently in to process applying this to master for testing.  I'll be testing it against many of the widgets to make sure things since work the same and I'll report back to @Mottie at that point I may attempt to apply it to working and test as well.  So stay tuned."}}