Lchika / ClubPage

メカトロ同好会エルチカのホームページ (Laravel+Vue.js)
0 stars 0 forks source link

投稿エラー時の表示が不親切 #13

Open pscmps opened 4 years ago

pscmps commented 4 years ago

image

2回再現した 手伝えることがあれば言ってもらえれば

kouya17 commented 4 years ago
[2020-04-17 21:58:39] production.ERROR: SQLSTATE[23503]: Foreign key violation: 7 ERROR:  テーブル"posts"への挿入、更新は外部キー制約"posts_category_id_foreign"に違反しています
DETAIL:  テーブル"categories"にキー(category_id)=(0)がありません (SQL: insert into "posts" ("abstract", "thumbnail", "id", "title", "category_id", "body", "compiled_body", "user_id", "updated_at", "created_at") values (, /storage/upload/images/aomOKGIAxsEXf67V5Sa5o4X48rr0BTRq0aEBQLCH.jpeg, 20200322kiko-key-holder-banzai, 機構キーホルダ・バンザイ, 0, 機構キーホルダのクランク機構バージョンです。

![20200408220708.jpg](/storage/upload/images/aomOKGIAxsEXf67V5Sa5o4X48rr0BTRq0aEBQLCH.jpeg)

## 遊び方
スライドしてバンザイするのを楽しみます。

## 動作の様子

<blockquote class="twitter-tweet"><p lang="ja" dir="ltr"><a href="https://twitter.com/hashtag/%E6%A9%9F%E6%A7%8B%E3%82%AD%E3%83%BC%E3%83%9B%E3%83%AB%E3%83%80?src=hash&amp;ref_src=twsrc%5Etfw">#機構キーホルダ</a> ・バンザイが完成しました<br>動作の様子です<a href="https://twitter.com/hashtag/Adventurer3?src=hash&amp;ref_src=twsrc%5Etfw">#Adventurer3</a> <a href="https://t.co/aOup9C3vZ7">pic.twitter.com/aOup9C3vZ7</a></p>&mdash; パスコンパス (@pscmps) <a href="https://twitter.com/pscmps/status/1249258414485585922?ref_src=twsrc%5Etfw">April 12, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

## 詳細な解説

<iframe class="hatenablogcard" style="width:100%;height:185px;margin:15px 0;max-width:680px;" title="【3Dプリンタ】(3DデータDL可)機構キーホルダ・クランクを作りました - パスコンパスの日記" src="https://hatenablog-parts.com/embed?url=https://yoichi-41.hatenablog.com/entry/20200412_banzai" frameborder="0" scrolling="no"></iframe>

## 3Dデータ
[3DデータDL場所(Thingverse)](https://www.thingiverse.com/thing:4277597), <p>機構キーホルダのクランク機構バージョンです。</p>
<p><img src="/storage/upload/images/aomOKGIAxsEXf67V5Sa5o4X48rr0BTRq0aEBQLCH.jpeg" alt="20200408220708.jpg"></p>
<h2 id="遊び方">遊び方</h2>
<p>スライドしてバンザイするのを楽しみます。</p>
<h2 id="動作の様子">動作の様子</h2>
<blockquote class="twitter-tweet"><p lang="ja" dir="ltr"><a href="https://twitter.com/hashtag/%E6%A9%9F%E6%A7%8B%E3%82%AD%E3%83%BC%E3%83%9B%E3%83%AB%E3%83%80?src=hash&amp;ref_src=twsrc%5Etfw">#機構キーホルダ</a> ・バンザイが完成しました<br>動作の様子です<a href="https://twitter.com/hashtag/Adventurer3?src=hash&amp;ref_src=twsrc%5Etfw">#Adventurer3</a> <a href="https://t.co/aOup9C3vZ7">pic.twitter.com/aOup9C3vZ7</a></p>&mdash; パスコンパス (@pscmps) <a href="https://twitter.com/pscmps/status/1249258414485585922?ref_src=twsrc%5Etfw">April 12, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

<h2 id="詳細な解説">詳細な解説</h2>
<iframe class="hatenablogcard" style="width:100%;height:185px;margin:15px 0;max-width:680px;" title="【3Dプリンタ】(3DデータDL可)機構キーホルダ・クランクを作りました - パスコンパスの日記" src="https://hatenablog-parts.com/embed?url=https://yoichi-41.hatenablog.com/entry/20200412_banzai" frameborder="0" scrolling="no"></iframe>

<h2 id="3dデータ">3Dデータ</h2>
<p><a href="https://www.thingiverse.com/thing:4277597">3DデータDL場所(Thingverse)</a></p>, 4, 2020-04-17 21:58:39, 2020-04-17 21:58:39) returning "id") {"userId":4,"exception":"[object] (Illuminate\\Database\\QueryException(code: 23503): SQLSTATE[23503]: Foreign key violation: 7 ERROR:  テーブル\"posts\"への挿入、更新は外部キー制約\"posts_category_id_foreign\"に違反しています
DETAIL:  テーブル\"categories\"にキー(category_id)=(0)がありません (SQL: insert into \"posts\" (\"abstract\", \"thumbnail\", \"id\", \"title\", \"category_id\", \"body\", \"compiled_body\", \"user_id\", \"updated_at\", \"created_at\") values (, /storage/upload/images/aomOKGIAxsEXf67V5Sa5o4X48rr0BTRq0aEBQLCH.jpeg, 20200322kiko-key-holder-banzai, 機構キーホルダ・バンザイ, 0, 機構キーホルダのクランク機構バージョンです。

![20200408220708.jpg](/storage/upload/images/aomOKGIAxsEXf67V5Sa5o4X48rr0BTRq0aEBQLCH.jpeg)

## 遊び方
スライドしてバンザイするのを楽しみます。

## 動作の様子

<blockquote class=\"twitter-tweet\"><p lang=\"ja\" dir=\"ltr\"><a href=\"https://twitter.com/hashtag/%E6%A9%9F%E6%A7%8B%E3%82%AD%E3%83%BC%E3%83%9B%E3%83%AB%E3%83%80?src=hash&amp;ref_src=twsrc%5Etfw\">#機構キーホルダ</a> ・バンザイが完成しました<br>動作の様子です<a href=\"https://twitter.com/hashtag/Adventurer3?src=hash&amp;ref_src=twsrc%5Etfw\">#Adventurer3</a> <a href=\"https://t.co/aOup9C3vZ7\">pic.twitter.com/aOup9C3vZ7</a></p>&mdash; パスコンパス (@pscmps) <a href=\"https://twitter.com/pscmps/status/1249258414485585922?ref_src=twsrc%5Etfw\">April 12, 2020</a></blockquote> <script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>

## 詳細な解説

<iframe class=\"hatenablogcard\" style=\"width:100%;height:185px;margin:15px 0;max-width:680px;\" title=\"【3Dプリンタ】(3DデータDL可)機構キーホルダ・クランクを作りました - パスコンパスの日記\" src=\"https://hatenablog-parts.com/embed?url=https://yoichi-41.hatenablog.com/entry/20200412_banzai\" frameborder=\"0\" scrolling=\"no\"></iframe>

## 3Dデータ
[3DデータDL場所(Thingverse)](https://www.thingiverse.com/thing:4277597), <p>機構キーホルダのクランク機構バージョンです。</p>
<p><img src=\"/storage/upload/images/aomOKGIAxsEXf67V5Sa5o4X48rr0BTRq0aEBQLCH.jpeg\" alt=\"20200408220708.jpg\"></p>
<h2 id=\"遊び方\">遊び方</h2>
<p>スライドしてバンザイするのを楽しみます。</p>
<h2 id=\"動作の様子\">動作の様子</h2>
<blockquote class=\"twitter-tweet\"><p lang=\"ja\" dir=\"ltr\"><a href=\"https://twitter.com/hashtag/%E6%A9%9F%E6%A7%8B%E3%82%AD%E3%83%BC%E3%83%9B%E3%83%AB%E3%83%80?src=hash&amp;ref_src=twsrc%5Etfw\">#機構キーホルダ</a> ・バンザイが完成しました<br>動作の様子です<a href=\"https://twitter.com/hashtag/Adventurer3?src=hash&amp;ref_src=twsrc%5Etfw\">#Adventurer3</a> <a href=\"https://t.co/aOup9C3vZ7\">pic.twitter.com/aOup9C3vZ7</a></p>&mdash; パスコンパス (@pscmps) <a href=\"https://twitter.com/pscmps/status/1249258414485585922?ref_src=twsrc%5Etfw\">April 12, 2020</a></blockquote> <script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>

<h2 id=\"詳細な解説\">詳細な解説</h2>
<iframe class=\"hatenablogcard\" style=\"width:100%;height:185px;margin:15px 0;max-width:680px;\" title=\"【3Dプリンタ】(3DデータDL可)機構キーホルダ・クランクを作りました - パスコンパスの日記\" src=\"https://hatenablog-parts.com/embed?url=https://yoichi-41.hatenablog.com/entry/20200412_banzai\" frameborder=\"0\" scrolling=\"no\"></iframe>

<h2 id=\"3dデータ\">3Dデータ</h2>
<p><a href=\"https://www.thingiverse.com/thing:4277597\">3DデータDL場所(Thingverse)</a></p>, 4, 2020-04-17 21:58:39, 2020-04-17 21:58:39) returning \"id\") at /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669)
[stacktrace]
#0 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Connection.php(629): Illuminate\\Database\\Connection->runQueryCallback()
#1 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Connection.php(338): Illuminate\\Database\\Connection->run()
#2 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Connection.php(309): Illuminate\\Database\\Connection->select()
#3 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/PostgresProcessor.php(20): Illuminate\\Database\\Connection->selectFromWriteConnection()
#4 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2695): Illuminate\\Database\\Query\\Processors\\PostgresProcessor->processInsertGetId()
#5 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1366): Illuminate\\Database\\Query\\Builder->insertGetId()
#6 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(839): Illuminate\\Database\\Eloquent\\Builder->__call()
#7 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(804): Illuminate\\Database\\Eloquent\\Model->insertAndSetId()
#8 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(667): Illuminate\\Database\\Eloquent\\Model->performInsert()
#9 /var/www/clubpage/app/Http/Controllers/PostController.php(47): Illuminate\\Database\\Eloquent\\Model->save()
#10 [internal function]: App\\Http\\Controllers\\PostController->create()
#11 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array()
#12 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction()
#13 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Route.php(219): Illuminate\\Routing\\ControllerDispatcher->dispatch()
#14 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Route.php(176): Illuminate\\Routing\\Route->runController()
#15 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Routing\\Route->run()
#16 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()
#17 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#18 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle()
#19 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(43): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#20 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Auth\\Middleware\\Authenticate->handle()
#21 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(76): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#22 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\VerifyCsrfToken->handle()
#23 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#24 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle()
#25 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(56): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#26 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Session\\Middleware\\StartSession->handle()
#27 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#28 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle()
#29 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(66): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#30 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle()
#31 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#32 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Router.php(683): Illuminate\\Pipeline\\Pipeline->then()
#33 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Router.php(658): Illuminate\\Routing\\Router->runRouteWithinStack()
#34 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Router.php(624): Illuminate\\Routing\\Router->runRoute()
#35 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Routing/Router.php(613): Illuminate\\Routing\\Router->dispatchToRoute()
#36 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(170): Illuminate\\Routing\\Router->dispatch()
#37 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(130): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}()
#38 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#39 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#40 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#41 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle()
#42 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#43 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle()
#44 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(63): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#45 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle()
#46 /var/www/clubpage/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#47 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(171): Fideloper\\Proxy\\TrustProxies->handle()
#48 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(105): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#49 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(145): Illuminate\\Pipeline\\Pipeline->then()
#50 /var/www/clubpage/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(110): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter()
#51 /var/www/clubpage/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle()
#52 {main}

恐らくこれ