-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
SQLSTATE[HY000]: General error: 1364 Field 'disk_name' doesn't have a default value #1190
Comments
@josephcrowell what happens if you run $attachment = new File();
$attachment->fromPost(Input::file('attachment'));
$attachment->save(); |
I'll give it a go and see. No issues yet but I'll give it a couple days. |
@josephcrowell this (https://github.com/wintercms/storm/blob/develop/src/Database/Attach/File.php#L570) is where it is supposed to be handling that for you, can you try some debugging around there to figure out why it is not? |
It's happening in production but I haven't been able to trigger it in my development environment. My best guess is that the uploads aren't being detected as instanceof UploadedFile. Could it possibly have something to do with the fact that I'm using this file uploader https://v5-standard-6.legacydocs.mdbootstrap.com/docs/standard/plugins/file-upload/ instead of a standard file input? |
@josephcrowell is there any difference in the requests sent by that uploader on production vs development? I can't think of why it should be any different from any other file uploader. |
Also is your code in production exactly what you provided? |
Yes it's the same code. I haven't gotten the error again after directly using fromPost. Internally that uploader is a standard file input. It just has a drop target tacked on. |
Very odd indeed. I'll close this for now then, let me know if it comes back or if you can replicate it on a fresh install. |
Will do. |
Winter CMS Build
dev-develop
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
I've been seeing this again which seems to be a regression of octobercms/october#5270
Stack Trace:
Steps to replicate
Workaround
No response
The text was updated successfully, but these errors were encountered: