JohnTendik / jtrt-tables

A Wordpress plugin to help users create responsive tables without having to read or write code.
GNU General Public License v2.0
22 stars 6 forks source link

Filtering/Sorting/Pagination Not Working #16

Closed dougdavis22 closed 7 years ago

dougdavis22 commented 7 years ago

Hi. Just installed your plugin as was having major slow loading times using another one. Imported a CSV fine, went ahead and set the checkboxes as I wanted them but although the table is showing on the page there is no option to sort or filter, and it's showing all the rows rather than the first 10 as specified.

URL is http://cccbrdev.org.uk/services/library/bellringers-obituaries-index/

Any ideas please? Thanks, Doug.

dougdavis22 commented 7 years ago

Not sure if this info helps:

VM330:1 Uncaught SyntaxError: Unexpected end of JSON input (anonymous function) @ jtrt-responsive-tables-public.min.js?ver=1.0.0:1 each @ jquery.js?ver=1.12.4:2 each @ jquery.js?ver=1.12.4:2 (anonymous function) @ jtrt-responsive-tables-public.min.js?ver=1.0.0:1 (anonymous function) @ jtrt-responsive-tables-public.min.js?ver=1.0.0:1

JohnTendik commented 7 years ago

Hey,

The reason why its saying "unexpected end of JSON" is because the code I setup originally fails to locate the json data within the page if the theme decides to wrap things around

tags automatically.

A quick fix for you would be to change line 43 of file jtrt-tables->public->js->jtrt-responsive-tables-public.js

Line 43, change it to look like this instead:

var tableBPs = JSON.parse(jQuery(this).prev().val()) || JSON.parse(jQuery(this).prev().find('input').val());

I'm working on a quick update to solve most of the stupid simple bugs hopefully released tonight so lookout for that update.

Let me know if this helps you for the time being, if not I will look into it more specifically for you.

Thanks John

JohnTendik commented 7 years ago

I just released 3.0.3, this issue is now solved as soon as you update :P Thanks for bringing this to my attention and using my plugin!

If you run into more issues feel free to reopen the ticket or create a new one.

John