cnizzardini / cakephp-datatable

CakePHP Component for interoperability between CakePHP 2.x and jQuery DataTables plugin.
62 stars 49 forks source link

Search Doesn't Work #30

Closed spacebiscuit closed 8 years ago

spacebiscuit commented 9 years ago

Hi,

I have DataTables working with version 2.6 of Cake. But I cannot get the search to work. When I input a string I get an error and the XHR tab on my inspector says:

Model "Classified" is not associated with model "OR"

Also when I add 'link' to my paginate array I get an error but it works when I use 'contain' instead.

Also I couldn't find any instruction that mention that I had to add this to my routes:

Router::parseExtensions('json');

It might help others as it took me others to figure this out.

Thanks.

spacebiscuit commented 9 years ago

I've done some further testing, it seems that for search to work the 'Linkable' plugin is required, without it I get the error as reported above.

cnizzardini commented 8 years ago

Yes and honestly, containable kinda sucks anyways.

spacebiscuit commented 8 years ago

Thanks for the reply. I actually managed to get it working with Containable data as well as Linkable, the original error must have been in my syntax. I use this plugin in on all of my projects now, works very well and saves a lot of time and effort - many thanks!

cnizzardini commented 8 years ago

Nice, thanks spacebiscuit!