{"action":"opened","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/5973","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/5973/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/5973/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/5973/events","html_url":"https://github.com/cakephp/cakephp/issues/5973","id":59091616,"number":5973,"title":"2.6.2 - Potential Paginator Bug","user":{"login":"snsmurf","id":293049,"avatar_url":"https://avatars.githubusercontent.com/u/293049?v=3","gravatar_id":"","url":"https://api.github.com/users/snsmurf","html_url":"https://github.com/snsmurf","followers_url":"https://api.github.com/users/snsmurf/followers","following_url":"https://api.github.com/users/snsmurf/following{/other_user}","gists_url":"https://api.github.com/users/snsmurf/gists{/gist_id}","starred_url":"https://api.github.com/users/snsmurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snsmurf/subscriptions","organizations_url":"https://api.github.com/users/snsmurf/orgs","repos_url":"https://api.github.com/users/snsmurf/repos","events_url":"https://api.github.com/users/snsmurf/events{/privacy}","received_events_url":"https://api.github.com/users/snsmurf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-26T15:49:29Z","updated_at":"2015-02-26T15:49:29Z","closed_at":null,"body":"Slight issue with the Paginator component. If you override the default limit and set 25 for example, and then proceed to amend the limit via a named parameter, the maxLimit will actually be set to the new default and not actually set to 100 like it defaults to in the Paginator component settings so now no matter how many you wish to retrieve it always returns 25.\r\n\r\nSo more step form to reproduce, we have \r\n\r\n\t$this->paginate = array(\r\n\t\t'limit' => 25\r\n\t);\r\n\t$data = $this->paginate();\r\n\r\nWe then have a drop down to allow the client to amend the limit on the fly to various increments (10, 25, 50, 100). Which gives us a url like:\r\n\r\n    /blog_posts/index/limit:50\r\n\r\nPaginate will still just return 25.\r\nDebugging the paginator options at various points throughout the process makes it seems like it could be [this line](https://github.com/cakephp/cakephp/blob/master/lib/Cake/Controller/Component/PaginatorComponent.php#L339). But why it's doing that, it just seems that if you override the default limit you're always going to run into this issue.\r\n\r\n\r\n\r\n"}}