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

通知設定でユーザーテーブルから組織テーブルの値を獲得する記述をし、ユーザーの更新処理をするとエラーでコケる。 #1136

Closed
hayashi-m-shinozaki opened this issue Mar 18, 2022 · 2 comments
Labels
bug Something isn't working - 不具合 waiting-release 修正完了、リリース待ち

Comments

@hayashi-m-shinozaki
Copy link

Describe the bug / バグの説明

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

通知設定でユーザーテーブルから組織テーブルの値を獲得する記述をし、ユーザーの更新処理をするとエラーになる

To Reproduce / 再現手順

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

①通知テンプレートでユーザーテーブルの更新情報を通知するためのテンプレートを作成する

②その際に通知テンプレートの通知本文欄に親テーブルの情報を取得する『組織${parent:organization_code}』を記述する

③ユーザーテーブルの通知設定で上記で作成した通知テンプレートを設定する

④ユーザーデータの追加・変更・削除のいずれかの処理をするとエラーになる

Version / 発生バージョン

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

centos 7.2.2009 64bit
php 7.4.28
Zend Engine 3.4.0
Laravel 6.20.44
mysql 14.14
exment v4.3.2

Error log / エラーログ

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

[2022-03-18 15:51:43] local.ERROR: Call to a member function getValue() on null {"userId":1,"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to a member function getValue() on null at /var/www/exment/vendor/exceedone/exment/src/Services/ReplaceFormat/Items/ParentValue.php:30)
[stacktrace]
#0 /var/www/exment/vendor/exceedone/exment/src/Services/ReplaceFormat/ReplaceFormatService.php(90): Exceedone\Exment\Services\ReplaceFormat\Items\ParentValue->replace()
#1 /var/www/exment/vendor/exceedone/exment/src/Services/Helpers.php(1422): Exceedone\Exment\Services\ReplaceFormat\ReplaceFormatService::replaceTextFromFormat()
#2 /var/www/exment/vendor/exceedone/exment/src/Services/NotifyService.php(704): replaceTextFromFormat()
#3 /var/www/exment/vendor/exceedone/exment/src/Notifications/MailSender.php(282): Exceedone\Exment\Services\NotifyService::replaceWord()
#4 /var/www/exment/vendor/exceedone/exment/src/Notifications/MailSender.php(207): Exceedone\Exment\Notifications\MailSender->getBodyAndBodyType()
#5 /var/www/exment/vendor/exceedone/exment/src/Notifications/MailSender.php(199): Exceedone\Exment\Notifications\MailSender->sendMail()
#6 /var/www/exment/vendor/exceedone/exment/src/Services/NotifyService.php(478): Exceedone\Exment\Notifications\MailSender->send()
#7 /var/www/exment/vendor/exceedone/exment/src/Services/NotifyService.php(406): Exceedone\Exment\Services\NotifyService::notifyMail()
#8 /var/www/exment/vendor/exceedone/exment/src/Model/Notify.php(342): Exceedone\Exment\Services\NotifyService::executeNotifyAction()
#9 /var/www/exment/vendor/exceedone/exment/src/Model/Notify.php(246): Exceedone\Exment\Model\Notify->notifyUser()
#10 /var/www/exment/vendor/exceedone/exment/src/Model/CustomValue.php(783): Exceedone\Exment\Model\Notify->notifyCreateUpdateUser()
#11 /var/www/exment/vendor/exceedone/exment/src/Model/CustomValue.php(554): Exceedone\Exment\Model\CustomValue->notify()
#12 /var/www/exment/vendor/exceedone/exment/src/Model/CustomValue.php(447): Exceedone\Exment\Model\CustomValue->savedEvent()
#13 /var/www/exment/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(369): Exceedone\Exment\Model\CustomValue::Exceedone\Exment\Model\{closure}()
#14 /var/www/exment/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php(218): Illuminate\Events\Dispatcher->Illuminate\Events\{closure}()
#15 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasEvents.php(189): Illuminate\Events\Dispatcher->dispatch()
#16 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(750): Illuminate\Database\Eloquent\Model->fireModelEvent()
#17 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(661): Illuminate\Database\Eloquent\Model->performUpdate()
#18 /var/www/exment/vendor/exceedone/laravel-admin/src/Form.php(636): Illuminate\Database\Eloquent\Model->save()
#19 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(29): Encore\Admin\Form->Encore\Admin\{closure}()
#20 /var/www/exment/vendor/laravel/framework/src/Illuminate/Database/DatabaseManager.php(349): Illuminate\Database\Connection->transaction()
#21 /var/www/exment/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(261): Illuminate\Database\DatabaseManager->__call()
#22 /var/www/exment/vendor/exceedone/laravel-admin/src/Form.php(648): Illuminate\Support\Facades\Facade::__callStatic()
#23 /var/www/exment/vendor/exceedone/exment/src/Controllers/HasResourceTableActions.php(22): Encore\Admin\Form->update()
#24 /var/www/exment/vendor/exceedone/exment/src/Controllers/CustomValueController.php(77): Exceedone\Exment\Controllers\CustomValueController->updateTrait()
#25 [internal function]: Exceedone\Exment\Controllers\CustomValueController->update()
#26 /var/www/exment/vendor/exceedone/exment/src/Controllers/AdminControllerTableBase.php(54): call_user_func_array()
#27 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Exceedone\Exment\Controllers\AdminControllerTableBase->callAction()
#28 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\Routing\ControllerDispatcher->dispatch()
#29 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\Routing\Route->runController()
#30 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\Routing\Route->run()
#31 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Routing\Router->Illuminate\Routing\{closure}()
#32 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Session.php(18): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#33 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\Admin\Middleware\Session->handle()
#34 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Permission.php(42): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#35 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\Admin\Middleware\Permission->handle()
#36 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Bootstrap.php(15): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#37 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\Admin\Middleware\Bootstrap->handle()
#38 /var/www/exment/vendor/exceedone/exment/src/Middleware/LogOperation.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#39 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\LogOperation->handle()
#40 /var/www/exment/vendor/exceedone/laravel-admin/src/Middleware/Pjax.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#41 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Encore\Admin\Middleware\Pjax->handle()
#42 /var/www/exment/vendor/renatomarinho/laravel-page-speed/src/Middleware/PageSpeed.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#43 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): RenatoMarinho\LaravelPageSpeed\Middleware\PageSpeed->handle()
#44 /var/www/exment/vendor/renatomarinho/laravel-page-speed/src/Middleware/PageSpeed.php(28): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#45 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): RenatoMarinho\LaravelPageSpeed\Middleware\PageSpeed->handle()
#46 /var/www/exment/vendor/exceedone/exment/src/Middleware/Bootstrap.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#47 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\Bootstrap->handle()
#48 /var/www/exment/vendor/exceedone/exment/src/Middleware/Morph.php(20): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#49 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\Morph->handle()
#50 /var/www/exment/vendor/exceedone/exment/src/Middleware/AuthenticatePasswordLimit.php(24): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#51 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\AuthenticatePasswordLimit->handle()
#52 /var/www/exment/vendor/exceedone/exment/src/Middleware/Authenticate2factor.php(23): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#53 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\Authenticate2factor->handle()
#54 /var/www/exment/vendor/exceedone/exment/src/Middleware/Authenticate.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#55 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\Authenticate->handle()
#56 /var/www/exment/vendor/exceedone/exment/src/Middleware/Initialize.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#57 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\Initialize->handle()
#58 /var/www/exment/vendor/exceedone/exment/src/Middleware/IpFilterBase.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#59 /var/www/exment/vendor/exceedone/exment/src/Middleware/WebIPFilter.php(15): Exceedone\Exment\Middleware\IpFilterBase->handleBase()
#60 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\WebIPFilter->handle()
#61 /var/www/exment/vendor/exceedone/exment/src/Middleware/Browser.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#62 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\Browser->handle()
#63 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#64 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Routing\Middleware\SubstituteBindings->handle()
#65 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(78): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#66 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle()
#67 /var/www/exment/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#68 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\View\Middleware\ShareErrorsFromSession->handle()
#69 /var/www/exment/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#70 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Session\Middleware\StartSession->handle()
#71 /var/www/exment/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#72 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle()
#73 /var/www/exment/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#74 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Cookie\Middleware\EncryptCookies->handle()
#75 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#76 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\Pipeline\Pipeline->then()
#77 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\Routing\Router->runRouteWithinStack()
#78 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\Routing\Router->runRoute()
#79 /var/www/exment/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\Routing\Router->dispatchToRoute()
#80 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\Routing\Router->dispatch()
#81 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}()
#82 /var/www/exment/vendor/exceedone/exment/src/Middleware/ExmentDebug.php(15): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#83 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\ExmentDebug->handle()
#84 /var/www/exment/vendor/exceedone/exment/src/Middleware/TrustProxies.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#85 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Exceedone\Exment\Middleware\TrustProxies->handle()
#86 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#87 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#88 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#89 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle()
#90 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#91 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle()
#92 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#93 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle()
#94 /var/www/exment/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#95 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\Proxy\TrustProxies->handle()
#96 /var/www/exment/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}()
#97 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\Pipeline\Pipeline->then()
#98 /var/www/exment/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter()
#99 /var/www/exment/public/index.php(55): Illuminate\Foundation\Http\Kernel->handle()
#100 {main}

Screenshots / スクリーンショット

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

image

image

Additional context / その他

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

@hayashi-m-shinozaki hayashi-m-shinozaki added the bug Something isn't working - 不具合 label Mar 18, 2022
@hirossyi73
Copy link
Contributor

現在、通知のテンプレートについて、N:Nの親テーブルの値を参照するような、${parent:organization_code}の値は取得できません。

@hirossyi73 hirossyi73 added the waiting-release 修正完了、リリース待ち label Apr 21, 2022
@hirossyi73
Copy link
Contributor

v4.4.0にて対応しました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working - 不具合 waiting-release 修正完了、リリース待ち
Projects
None yet
Development

No branches or pull requests

2 participants