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

ブログ記事のタイトルを255文字にして保存しようとすると500エラーになる問題 #1638

Closed
katokaisya opened this issue Feb 2, 2021 · 0 comments

Comments

@katokaisya
Copy link
Collaborator

ブログ記事のタイトルは管理画面上255文字まで入るはずだが、243文字しか通らない。

・DBのsqlmodeにSTRICT_TRANS_TABLESを追加すると発生する。
エラーメッセージ
Error: [PDOException] SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1

原因

mysite_dblogsでカラム nameがvarchar(255)のため文字数制限に引っかかる。

記事「〇〇〇」を更新しました。
〇〇〇が255文字あると、合計267文字になり、エラーになる。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant