Jump to content

DataTables pagination bug - found fix

datatables pagination

  • Please log in to reply
1 reply to this topic

#1 saulimus


    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 11 July 2012 - 09:27 AM


I found a bug in GroceryCrud when using DataTables.
The bug makes it not possible to click 'Next' and shows the following line wrong:
Displaying 1 to 010 of 23 items
The line above should obviously be "10" and not "010".

File: 'assets\grocery_crud\themes\datatables\views\list_template.php'
var default_per_page = '<?php echo $default_per_page;?>';
Cause: Datatables expects default_per_page to be a number and not a string

How to fix: Remove the single quotes :)
var default_per_page = <?php echo $default_per_page;?>;

You can check the bug out at:

#2 web-johnny


    grocery CRUD Author

  • Administrators
  • 1,150 posts
  • LocationLondon

Posted 11 July 2012 - 09:45 PM

Thanks for that I just replaced it.

I liked your bug report.
1. Description of what you where expected
2. The problem
3. And the fix :)
Posted Image

Also tagged with one or more of these keywords: datatables, pagination

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users