Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【ブログ記事一覧API】APIでlimitを指定しないと最大20件で制限されてしまう #2528

Open
kaburk opened this issue Jun 29, 2023 · 3 comments
Assignees
Labels
Review レビュー要

Comments

@kaburk
Copy link
Collaborator

kaburk commented Jun 29, 2023

概要

CakePHPコアのPagenatiorで初期値が指定されているようで指定しないとそっちが有効になっているようでした。
ブログAPI以外にもページネーションのところで同様になりそうなのでなんか対策とかどっかに説明が必要そうです。

CakePHP4系
htdocs/vendor/cakephp/cakephp/src/Datasource/Paging/NumericPaginator.php

  protected $_defaultConfig = [
       'page' => 1,
       'limit' => 20,
       'maxLimit' => 100,
       'allowedParameters' => ['limit', 'sort', 'page', 'direction'],
   ];

baserCMS version : 5.0.2-dev

備考

管理側はページネーションのUIがあるので良さそうですが、独自のコンテンツで一覧とか作るときとか要注意かもです

CakePHP2系の時から初期値同じだったみたいです、普段気にしてなかったので気がつかなかった…。
/lib/Cake/Controller/Component/PaginatorComponent.php

	public $settings = array(
		'page' => 1,
		'limit' => 20,
		'maxLimit' => 100,
		'paramType' => 'named',
		'queryScope' => null
	);
@ryuring ryuring added the Review レビュー要 label Jun 30, 2023
@ryuring
Copy link
Collaborator

ryuring commented Jun 30, 2023

どう対処するのが正解なのか検討が必要ですねえ

@ryuring
Copy link
Collaborator

ryuring commented Oct 3, 2023

@kaburk こちらの件、どうするのがいいですかね?開発側で認識してクローズでもいいかと思いますがいかがでしょう?

@ryuring ryuring changed the title ブログ記事一覧のAPIでlimitを指定しないと最大20件で制限されてしまう 【ブログ記事一覧API】APIでlimitを指定しないと最大20件で制限されてしまう Apr 17, 2024
@ryuring
Copy link
Collaborator

ryuring commented Apr 18, 2024

ページネーション情報を一緒に返却する方針とする

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review レビュー要
Projects
None yet
Development

No branches or pull requests

2 participants