Marketing digital. Making results.

CakePHP 2.0: AjaxHelper does not implement a link() method, it is incompatible with PaginatorHelper error message

Upgrading Nouchi.Mobi from 1.3 to 2.0, i got this error on my page and spent quite a few moments trying to debug. I narrowed it down to this call I was making:

$this->helpers['Paginator'] = array(‘ajax’ => ‘Ajax’);

This sets up Ajax pagination in CakePHP 1.3 by using the AjaxHelper class but in 2.0, this functionality has been delegated to the JsHelper. I removed that line from the code and was on my way from then on. Refer to this link in the official documentation to properly set up Ajax Pagination in CakePHP 2.0; all that is needed is the RequestHandler component, and the Js Helper.