BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
Saving an entry with a cropped image fails, field too long for column
#30 opened by mxdgt
Description
Solution:
Install Ansel 1.0.4 to get the content column schema updates.
Craft throws this error on save:
CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_imageCropped' at row 1
This did not occur before the latest plugin and craft updates. Any help would be greatly appreciated.
Replies
- TJ Draper
Replied 6/12/2017 9:32 AM, Edited 6/21/2017 10:01 AM
Hi mxdgt, sorry for the delay.
I have been unable to reproduce this issue. How many images do you have in the field when this is happening?
- mxdgt
Replied 6/15/2017 8:51 PM, Edited 6/21/2017 10:01 AM
No worries!
Only a single image is in the field. Out of interest, I setup a fresh install of Craft, installed the plugin, setup a section with a single field for ansel and got the same error.
- mxdgt
Replied 6/15/2017 9:25 PM, Edited 6/21/2017 10:01 AM
I think I found a solution - see private info
- TJ Draper
Replied 6/16/2017 7:04 AM, Edited 6/21/2017 10:01 AM
Ahh, yeah, I could see that being a problem. Odd that I am not able to reproduce it though. I’m traveling this weekend but I should be able to push that fix out Monday or Tuesday.
- TJ Draper
Replied 6/20/2017 11:34 PM, Edited 6/21/2017 10:01 AM
Hi mxdgt,
I’ve attached a beta of 1.0.4 which updates the content column and contains a migration that should update all existing Ansel fields (by re-saving them to get Craft to pick up the column changes). If you could give that a shot and make sure nothing blows up, I would appreciate it.
- mxdgt
Replied 6/20/2017 11:47 PM, Edited 6/21/2017 10:01 AM
Sure, I can give it a shot, however the site that I was working on I already switched the column type manually in the DB - so I can't test the migration. But it'll be interesting to see if it has any adverse effects (a double migration of sorts that is). I'll need to make sure of this anyhow as this site will be going to production shortly.
What I can do though is test it on the temp test site I setup, I'll let you know how I go. When do you expect to have 1.0.4 released?
- TJ Draper
Replied 6/20/2017 11:48 PM, Edited 6/21/2017 10:01 AM
I’ll probably release it before end of day tomorrow (I’m in central daylight time in the U.S.).
- mxdgt
Replied 6/21/2017 12:17 AM, Edited 6/21/2017 10:01 AM
Good news! It's worked in both circumstances.
- TJ Draper
Replied 6/21/2017 10:01 AM, Edited 6/21/2017 10:01 AM
1.0.4 has been released.