exceedone / exment

Exment is open source software for managing information assets on the Web. / Exmentは、情報資産をWeb上で管理するための、オープンソースソフトウェアです。
https://exment.net/docs/#
GNU General Public License v3.0
268 stars 67 forks source link

親テーブルで複数の子テーブルをテーブル形式でページングするとエラーが発生 #1494

Open f-takahiro-watanabe opened 3 months ago

f-takahiro-watanabe commented 3 months ago

Describe the bug / バグの説明

親テーブルで複数の子テーブルをテーブル形式でページングするとエラーが発生します。

To Reproduce / 再現手順

親テーブルで複数の子テーブルをリレーション設定し、子テーブルをテーブル形式にて設定します。 データ詳細画面でページングが発生する子テーブルと、ページングが発生しない子テーブルで存在する状態で、 ページングが発生する子テーブルで次へボタンをクリックするとエラーが発生します。

Version / 発生バージョン

v6.1.0

Error log / エラーログ

` [2024-07-31 22:59:39] local.ERROR: Encore\Admin\Middleware\Pjax::respond(): Argument #1 ($response) must be of type Illuminate\Http\Response, Illuminate\Http\RedirectResponse given, called in /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php on line 515 {"userId":1,"exception":"[object] (TypeError(code: 0): Encore\Admin\Middleware\Pjax::respond(): Argument #1 ($response) must be of type Illuminate\Http\Response, Illuminate\Http\RedirectResponse given, called in /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php on line 515 at /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Pjax.php:46) [stacktrace]

0 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php(515): Encore\Admin\Middleware\Pjax::respond()

1 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php(464): Encore\Admin\Grid\Model->handleInvalidPage()

2 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php(361): Encore\Admin\Grid\Model->get()

3 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Filter.php(547): Encore\Admin\Grid\Model->buildData()

4 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Concerns/HasFilter.php(65): Encore\Admin\Grid\Filter->execute()

5 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid.php(641): Encore\Admin\Grid->applyFilter()

6 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid.php(1083): Encore\Admin\Grid->build()

7 /var/www/exment/vendor/exceedone/exment/src/DataItems/Show/DefaultShow.php(441): Encore\Admin\Grid->render()

8 /var/www/exment/vendor/exceedone/exment/src/DataItems/Show/DefaultShow.php(68): Exceedone\Exment\DataItems\Show\DefaultShow->setChildBlockBox()

9 /var/www/exment/vendor/exceedone/exment/src/Controllers/CustomValueController.php(409): Exceedone\Exment\DataItems\Show\DefaultShow->setOptionBoxes()

10 [internal function]: Exceedone\Exment\Controllers\CustomValueController->Exceedone\Exment\Controllers\{closure}()

11 /var/www/exment/vendor/exceedone/laravel-admin/src/Layout/Content.php(166): call_user_func()

12 /var/www/exment/vendor/exceedone/exment/src/Controllers/CustomValueController.php(407): Encore\Admin\Layout\Content->row()

13 /var/www/exment/vendor/exceedone/exment/src/Controllers/AdminControllerTableBase.php(59): Exceedone\Exment\Controllers\CustomValueController->show()

14 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Exceedone\Exment\Controllers\AdminControllerTableBase->callAction()

15 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Illuminate\Routing\ControllerDispatcher->dispatch()

16 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()

17 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(806): Illuminate\Routing\Route->run()

18 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Routing\Router->Illuminate\Routing\{closure}()

19 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Session.php(18): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

20 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Encore\Admin\Middleware\Session->handle()

21 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Permission.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

22 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Encore\Admin\Middleware\Permission->handle()

23 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

24 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Encore\Admin\Middleware\Bootstrap->handle()

25 /var/www/exment/vendor/exceedone/exment/src/Middleware/LogOperation.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

26 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\LogOperation->handle()

27 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Pjax.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

28 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Encore\Admin\Middleware\Pjax->handle()

29 /var/www/exment/vendor/exceedone/exment/src/Middleware/Bootstrap.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

30 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\Bootstrap->handle()

31 /var/www/exment/vendor/exceedone/exment/src/Middleware/Morph.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

32 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\Morph->handle()

33 /var/www/exment/vendor/exceedone/exment/src/Middleware/AuthenticatePasswordLimit.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

34 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\AuthenticatePasswordLimit->handle()

35 /var/www/exment/vendor/exceedone/exment/src/Middleware/Authenticate2factor.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

36 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\Authenticate2factor->handle()

37 /var/www/exment/vendor/exceedone/exment/src/Middleware/Authenticate.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

38 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\Authenticate->handle()

39 /var/www/exment/vendor/exceedone/exment/src/Middleware/Initialize.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

40 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\Initialize->handle()

41 /var/www/exment/vendor/exceedone/exment/src/Middleware/IpFilterBase.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

42 /var/www/exment/vendor/exceedone/exment/src/Middleware/WebIPFilter.php(15): Exceedone\Exment\Middleware\IpFilterBase->handleBase()

43 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\WebIPFilter->handle()

44 /var/www/exment/vendor/exceedone/exment/src/Middleware/Browser.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

45 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\Browser->handle()

46 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

47 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Routing\Middleware\SubstituteBindings->handle()

48 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

49 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()

50 /var/www/exment/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

51 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\View\Middleware\ShareErrorsFromSession->handle()

52 /var/www/exment/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

53 /var/www/exment/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()

54 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Session\Middleware\StartSession->handle()

55 /var/www/exment/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

56 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()

57 /var/www/exment/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

58 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Cookie\Middleware\EncryptCookies->handle()

59 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

60 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(805): Illuminate\Pipeline\Pipeline->then()

61 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(784): Illuminate\Routing\Router->runRouteWithinStack()

62 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(748): Illuminate\Routing\Router->runRoute()

63 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(737): Illuminate\Routing\Router->dispatchToRoute()

64 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch()

65 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(144): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()

66 /var/www/exment/vendor/exceedone/exment/src/Middleware/ExmentDebug.php(15): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

67 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\ExmentDebug->handle()

68 /var/www/exment/vendor/exceedone/exment/src/Middleware/TrustProxies.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

69 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Exceedone\Exment\Middleware\TrustProxies->handle()

70 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

71 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

72 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()

73 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

74 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()

75 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()

76 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

77 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()

78 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(99): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

79 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()

80 /var/www/exment/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

81 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\HandleCors->handle()

82 /var/www/exment/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

83 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(183): Illuminate\Http\Middleware\TrustProxies->handle()

84 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(119): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()

85 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then()

86 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()

87 /var/www/exment/public/index.php(51): Illuminate\Foundation\Http\Kernel->handle()

88 {main}

"} `

Screenshots / スクリーンショット

image

Additional context / その他

現状、回避策等ありませんでした。

f-takahiro-watanabe commented 3 months ago

URLのパラメータで「&per_page=xxx&page=2」で子テーブルすべてに対して、 pageパラメータが連動しているのでそこでエラーが発生しているようです。

子テーブルごとにpageパラメータの制御ができるようにするか、 page数のMAXを超えた場合は最終ページを表示できるようにするか、 どちらかだと考えます。