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

フィルタ検索でエラーが発生するケースがあります #1233

Closed
a0z0 opened this issue Sep 13, 2022 · 2 comments
Closed

フィルタ検索でエラーが発生するケースがあります #1233

a0z0 opened this issue Sep 13, 2022 · 2 comments
Labels
bug Something isn't working - 不具合 wontfix

Comments

@a0z0
Copy link

a0z0 commented Sep 13, 2022

Describe the bug / バグの説明

A clear and concise description of what the bug is. / バグの内容のかんたんな説明を記載してください。

フィルタ検索で選択肢(他のテーブルや組織)で検索するとSQLエラーが発生する場合があります。
選択肢を指定せずに検索する場合は問題ありません。

To Reproduce / 再現手順

Please describe the reproduction procedure in as much detail as possible. / 再現手順を、可能な限り詳細に記載してください。

どのようなカスタムテーブルでエラーになるのかは切り分けできていません。
正常にフィルタ検索できるカスタムテーブルもあります。

Version / 発生バージョン

Please describe version. / ご利用のバージョンを記載してください。
Version v5.0.3

Error log / エラーログ

If possible, paste error log. Log's path is "storage/logs/laravel.log". / 可能であれば、ログを貼り付けてください。ログのパスは"storage/logs/laravel.log"です。

Next Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column '326c33e61acaa7c709b5.column_350c2a58afb5d21af489' in 'where clause' (SQL: select count(*) as aggregate from exm__95afd40c538c71a95c62 left join exm__85655f8649732c914180 as c3e574a1ed8d790f2fde on c3e574a1ed8d790f2fde.id = exm__95afd40c538c71a95c62.column_08be465520641ef395b7 left join exm__69931faff4897e5c3e93 as 326c33e61acaa7c709b5 on 326c33e61acaa7c709b5.id = exm__95afd40c538c71a95c62.column_350c2a58afb5d21af489 where (exm__95afd40c538c71a95c62.column_e5a7bd1ffef6812c0391 LIKE %08029%) and (326c33e61acaa7c709b5.column_350c2a58afb5d21af489 in (73)) and exm__95afd40c538c71a95c62.deleted_at is null) in /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php:759
Stack trace:
#0 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(719): Illuminate\Database\Connection->runQueryCallback()
#1 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Connection.php(421): Illuminate\Database\Connection->run()
#2 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2630): Illuminate\Database\Connection->select()
#3 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2618): Illuminate\Database\Query\Builder->runSelect()
#4 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3154): Illuminate\Database\Query\Builder->Illuminate\Database\Query{closure}()
#5 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2619): Illuminate\Database\Query\Builder->onceWithColumns()
#6 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2768): Illuminate\Database\Query\Builder->get()
#7 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2727): Illuminate\Database\Query\Builder->runPaginationCountQuery()
#8 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(880): Illuminate\Database\Query\Builder->getCountForPagination()
#9 [internal function]: Illuminate\Database\Eloquent\Builder->paginate()
#10 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php(459): call_user_func_array()
#11 /var/www/exment/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php(264): Encore\Admin\Grid\Model->Encore\Admin\Grid{closure}()
#12 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php(461): Illuminate\Support\Collection->each()
#13 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Model.php(364): Encore\Admin\Grid\Model->get()
#14 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Filter.php(547): Encore\Admin\Grid\Model->buildData()
#15 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid/Concerns/HasFilter.php(65): Encore\Admin\Grid\Filter->execute()
#16 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid.php(643): Encore\Admin\Grid->applyFilter()
#17 /var/www/exment/vendor/exceedone/laravel-admin/src/Grid.php(1087): Encore\Admin\Grid->build()
#18 /var/www/exment/vendor/exceedone/laravel-admin/src/Layout/Column.php(93): Encore\Admin\Grid->render()
#19 /var/www/exment/vendor/exceedone/laravel-admin/src/Layout/Row.php(116): Encore\Admin\Layout\Column->build()
#20 /var/www/exment/vendor/exceedone/laravel-admin/src/Layout/Content.php(223): Encore\Admin\Layout\Row->build()
#21 /var/www/exment/vendor/exceedone/laravel-admin/src/Layout/Content.php(305): Encore\Admin\Layout\Content->build()
#22 /var/www/exment/vendor/laravel/framework/src/Illuminate/Http/Response.php(69): Encore\Admin\Layout\Content->render()
#23 /var/www/exment/vendor/laravel/framework/src/Illuminate/Http/Response.php(35): Illuminate\Http\Response->setContent()
#24 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(833): Illuminate\Http\Response->__construct()
#25 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(802): Illuminate\Routing\Router::toResponse()
#26 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(725): Illuminate\Routing\Router->prepareResponse()
#27 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Routing\Router->Illuminate\Routing{closure}()
#28 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Session.php(18): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#29 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Encore\Admin\Middleware\Session->handle()
#30 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Permission.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#31 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Encore\Admin\Middleware\Permission->handle()
#32 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#33 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Encore\Admin\Middleware\Bootstrap->handle()
#34 /var/www/exment/vendor/exceedone/exment/src/Middleware/LogOperation.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#35 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\LogOperation->handle()
#36 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Pjax.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#37 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Encore\Admin\Middleware\Pjax->handle()
#38 /var/www/exment/vendor/exceedone/exment/src/Middleware/Bootstrap.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#39 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\Bootstrap->handle()
#40 /var/www/exment/vendor/exceedone/exment/src/Middleware/Morph.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#41 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\Morph->handle()
#42 /var/www/exment/vendor/exceedone/exment/src/Middleware/AuthenticatePasswordLimit.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#43 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\AuthenticatePasswordLimit->handle()
#44 /var/www/exment/vendor/exceedone/exment/src/Middleware/Authenticate2factor.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#45 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\Authenticate2factor->handle()
#46 /var/www/exment/vendor/exceedone/exment/src/Middleware/Authenticate.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#47 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\Authenticate->handle()
#48 /var/www/exment/vendor/exceedone/exment/src/Middleware/Initialize.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#49 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\Initialize->handle()
#50 /var/www/exment/vendor/exceedone/exment/src/Middleware/IpFilterBase.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#51 /var/www/exment/vendor/exceedone/exment/src/Middleware/WebIPFilter.php(15): Exceedone\Exment\Middleware\IpFilterBase->handleBase()
#52 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\WebIPFilter->handle()
#53 /var/www/exment/vendor/exceedone/exment/src/Middleware/Browser.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#54 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\Browser->handle()
#55 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#56 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#57 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#58 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#59 /var/www/exment/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#60 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#61 /var/www/exment/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#62 /var/www/exment/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest()
#63 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Session\Middleware\StartSession->handle()
#64 /var/www/exment/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#65 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#66 /var/www/exment/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#67 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#68 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#69 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(726): Illuminate\Pipeline\Pipeline->then()
#70 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(703): Illuminate\Routing\Router->runRouteWithinStack()
#71 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(667): Illuminate\Routing\Router->runRoute()
#72 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(656): Illuminate\Routing\Router->dispatchToRoute()
#73 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Illuminate\Routing\Router->dispatch()
#74 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http{closure}()
#75 /var/www/exment/vendor/exceedone/exment/src/Middleware/ExmentDebug.php(15): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#76 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\ExmentDebug->handle()
#77 /var/www/exment/vendor/exceedone/exment/src/Middleware/TrustProxies.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#78 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Exceedone\Exment\Middleware\TrustProxies->handle()
#79 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#80 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#81 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle()
#82 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#83 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#84 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\TrimStrings->handle()
#85 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#86 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#87 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#88 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle()
#89 /var/www/exment/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#90 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Fruitcake\Cors\HandleCors->handle()
#91 /var/www/exment/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#92 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustProxies->handle()
#93 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}()
#94 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then()
#95 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#96 /var/www/exment/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle()
#97 {main}

Screenshots / スクリーンショット

If possible, paste the screenshot. / 可能であれば、スクリーンショットを貼り付けてください。

以下はユーザー一覧のフィルタ検索です。
image

image

Additional context / その他

Add any other context about the problem here. / その他に記載すべき内容がありましたら、ご記載ください。

@a0z0 a0z0 added the bug Something isn't working - 不具合 label Sep 13, 2022
@stale
Copy link

stale bot commented Mar 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 18, 2023
@koizu-mkII
Copy link
Collaborator

@a0z0
記載いただいた内容から、ユーザーテーブルのフィルタサーチで再現が確認できているようですので、ユーザーテーブルとカスタム列で利用しているテーブルを含めた「テンプレート」をエクスポートしていただき、こちらにアップしていただくことは可能でしょうか?

なお、スクリーンショットから推察するに、カスタム列[役割]に条件を入力して「サーチ」ボタンをクリックすると再現できると解釈しましたが、間違いありませんでしょうか?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working - 不具合 wontfix
Projects
None yet
Development

No branches or pull requests

2 participants