-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 #5270
Comments
I'm also having trouble with database attachment creation.
Either with :
or with :
|
Reverting back to But it's very strange ... This line has always been like this? |
@bennothommo can you look into this? |
@damsfx @tobias-kuendig @4nik3t is this issue present in v1.1.0? |
Test this code (from command) with two fresh installs. $settings = \Backend\Models\BrandSetting::instance();
$settings->logo = 'plugins/hounddd/toolbox/assets/images/logo.png';
$settings->save();
October 1.1 : Work nice ! in composer.json
"require": {
"php": ">=7.2",
"october/rain": "~1.1",
"october/system": "~1.1",
"october/backend": "~1.1",
"october/cms": "~1.1",
"laravel/framework": "~6.0",
"wikimedia/composer-merge-plugin": "1.4.1",
"offline/oc-bootstrapper": "^0.9.1"
}, October 1.0 : Error. in composer.json
"require": {
"php": ">=7.0.8",
"ext-mbstring": "*",
"ext-openssl": "*",
"october/rain": "~1.0",
"october/system": "~1.0",
"october/backend": "~1.0",
"october/cms": "~1.0",
"laravel/framework": "~5.5.40",
"wikimedia/composer-merge-plugin": "1.4.1",
"offline/oc-bootstrapper": "^0.9.0"
}, Result this error In Connection.php line 664:
SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: system_files.disk_name (SQL: insert into "s
ystem_files" ("is_public", "field", "attachment_id", "attachment_type", "updated_at", "created_at") values (1, logo, 1, Bac
kend\Models\BrandSetting, 2020-09-10 23:10:12, 2020-09-10 23:10:12))
In PDOStatement.php line 107:
SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: system_files.disk_name
In PDOStatement.php line 105:
SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: system_files.disk_name If I set |
@LukeTowers Laravel have backported that security fix from L6 and L7 to L5.5 (the one which made guarded attributes that are not actual database columns no longer work) - laravel/framework#33858 We'll have to add the changes from octobercms/library@6cd6af6 into the 1.0 branch too. |
All, If this is preventing you from doing work in the mean time, and you have used Composer, the simple fix is to change the |
Another simple fix would be to just upgrade to v1.1.0 via composer too :) |
Fixed by octobercms/library#521 - will be released with the next build of 1.0. |
Description:
I have created a component inside for my custom plugin and I am trying to attach one resume to the user model.
Plugin.php in the register method I have placed the following code.
This is the partial file
I am uploading the file via AjaxHandler onUpdate(). Here is the code in the method.
When the above code runs it throws an Exception as follows
The text was updated successfully, but these errors were encountered: