Ignited DataTables: Undefined property: Datatables::$like in Datatables.php on line 408
Ignited DataTables: Undefined property: Datatables::$like in Datatables.php on line 408
This issue is pertaining to Ignited Datatables PHP Library (http://datatables.net/forums/discussion/5133/ignited-datatables-php-library/p1 and https://github.com/n1crack/IgnitedDatatables-php-library).
I have downloaded the master copy of Ignited DataTables, and am using XAMPP on Windows 8.1 x64. I already altered the database settings to match the credentials to my phpMyAdmin login, as well as imported the sample database 'sakila' from the MySQL website. I have also replaced instances of the CSS and JS files in the example index.php files to point to the CDN versions of the original DataTables JS and CSS files.
The issue is that the example files used could not initialize the instance of Ignited Datatables. The error message when debugging the JSON (using xDebug) is as follows:
Notice: Undefined property: Datatables::$like in C:\xampp\htdocs\IgnitedDatatables\Datatables.php on line 408
Call StackTime Memory Function Location
1 0.0043 157456 {main}( ) ..\ajax.php:0
2 0.0170 322376 Datatables->generate( ) ..\ajax.php:23
3 0.0258 323304 Datatables->produce_output( ) ..\Datatables.php:241
4 0.0563 325128 Datatables->get_total_results( ) ..\Datatables.php:347
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\IgnitedDatatables\Datatables.php on line 408
Call StackTime Memory Function Location
1 0.0043 157456 {main}( ) ..\ajax.php:0
2 0.0170 322376 Datatables->generate( ) ..\ajax.php:23
3 0.0258 323304 Datatables->produce_output( ) ..\Datatables.php:241
4 0.0563 325128 Datatables->get_total_results( ) ..\Datatables.php:347
I am not sure what I am missing; do I need to copy additional files to fix this, as I am anxious to use Ignited Datatables in conjunction with existing installation of Datatables?
This question has an accepted answers - jump to answer
Answers
Might be best to open a github issue. I'm not sure if the author of IgnitedDataTables visits this forum often.
Allan
For everyone who has encountered this or similar issue(s) on Ignited Datatables (PHP Library without CodeIgniter), there is an issue (open as of August 2014) at https://github.com/n1crack/IgnitedDatatables-php-library/issues/5 which reads:
So that means at the meantime, if you are using the CDN links to Datatables jQuery and CSS files (the URLs inside the example PHP files are super-outdated), a temporary fix is:
Go to file
Datatables.php
inside your extractedIgnitedDatatables
folderComment out these lines: