Lars282 Posted June 10, 2019 Share Posted June 10, 2019 Hi. I am suddenly receiving an error on a production site that has worked perfectly over the past years. When uploading an image to a field called article_images, I receive the following error: Quote SQLSTATE[HY000]: General error: 1364 Field 'Credits' doesn't have a default value I had set up this field to accept an additional value for "Credits" with each image: This is also reflected in the database: I have not made any changes to the setup/settings in the past years. Does anyone have an idea on where this could be coming from now and how to fix it? Any help would be highly appreciated! Lars Link to comment Share on other sites More sharing options...
teppo Posted June 10, 2019 Share Posted June 10, 2019 3 hours ago, Lars282 said: I have not made any changes to the setup/settings in the past years. Does anyone have an idea on where this could be coming from now and how to fix it? Any help would be highly appreciated! Have you updated ProcessWire, Image Extra module, or your database software recently? This error looks like it's coming from a custom database column added by the Image Extra module, so I would recommend opening an issue on its GitHub repository (https://github.com/justb3a/processwire-imageextra), or alternatively posting a question to the Image Extra support thread. The "Credits" database column is set to require a value, and there's no default value for it; it could be just that you can't provide a value when uploading the image, which in turn results in the issue you're seeing here. I'm really not sure why this would've worked for you before, but the module was last updated a month ago, and that update included some changes to Exception handling. In theory that could be causing the error you see here, though it does seem like a kind of a long shot. 1 Link to comment Share on other sites More sharing options...
Lars282 Posted June 11, 2019 Author Share Posted June 11, 2019 7 hours ago, teppo said: Have you updated ProcessWire, Image Extra module, or your database software recently? I haven’t touched the install at all ... 7 hours ago, teppo said: The "Credits" database column is set to require a value, and there's no default value for it; it could be just that you can't provide a value when uploading the image, which in turn results in the issue you're seeing here. Where do you see this? Is there a (temporary) „quick fix“ that you can see? Change this column to optional? Change the database column to accept null values and put default to null? Will also move this to the image extra spaces. Thanks a lot for your help, highly appreciated! Link to comment Share on other sites More sharing options...
teppo Posted June 11, 2019 Share Posted June 11, 2019 1 hour ago, Lars282 said: Where do you see this? Is there a (temporary) „quick fix“ that you can see? Change this column to optional? Change the database column to accept null values and put default to null? What I meant was that it doesn't accept null value, as can be seen from your screenshot. Changing it to allow null might indeed be a valid temporary fix, though that could leave some sort of underlying issue open ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now