I have a problem with the Cakephp2.3 paginator helper. In the 1.3 version, the paginate method was checking if the passed page param has a correct value. Now, it's not working anymore.
For example, if I have a list with 30 results, 10 items per page, then this was redirecting to the last (third) page:
mycontroller/index/page:130
Now, when I modify the url directly in the browser and pass an invalid page number, it just says there are no results.
This is how I'm using the paginate method:
$this->paginate = array(
'limit' => 10,
'order' => 'Appointment.start_datetime DESC'
);
$appointments = $this->paginate('Appointment');
Is there something I'm missing?
Thank you in advance.
UPDATE
The paginator helper does know how to count the number of pages corectly, but it doesn't seem to care if a correct page number is passed. Here is the output from the view:
print_r($this->Paginator->params());
shows:
Array
(
[page] => 1
[current] => 10
[count] => 30
[prevPage] =>
[nextPage] => 1
[pageCount] => 3
[order] => Appointment.start_datetime DESC
[limit] => 10
[options] => Array
(
[page] => 1
)
[paramType] => named
)