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.
database error
#110 opened by BERT House BV
Description
we can't seem to save certain sections of the site, error below: Internal Server Error CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (uitinens_test.uie_anselImages, CONSTRAINT uie_anselImages_originalAssetId_fk FOREIGN KEY (originalAssetId) REFERENCES uie_assetfiles (id) ON DELETE SET NULL)
Other sections containing a ansel image field do not show this error on save.
Replies
- BERT House BV
Replied 6/14/2018 7:52 AM, Edited 11/10/2018 9:49 AM
We somehow had ansel fields with empty images. We removed those empty images, after removal we could save these pages again.
Screen Shot 2018-06-14 at 14.38.28
- TJ Draper
Replied 6/14/2018 10:21 AM, Edited 11/10/2018 9:49 AM
That's odd and I haven't run into that before. Glad you were able to get it sorted out.
- BERT House BV
Replied 6/14/2018 10:34 AM, Edited 11/10/2018 9:49 AM
we had some troubles uploading large images, wider than 5000 pixels. Could it be that after the save this results in an empty row in the ansel field type?
- TJ Draper
Replied 6/14/2018 10:44 AM, Edited 11/10/2018 9:49 AM
Yeah, that's very possible. Manipulating large images is very server intensive. If the process didn't finish, it's possible a database row would have been created but the image never saved and/or the Craft Asset wasn't added.
For very large images you might try increasing PHP timeout and making sure enough memory is allocated to PHP.
- BERT House BV
Replied 6/15/2018 2:32 AM, Edited 11/10/2018 9:49 AM
We increased php memory recently to 512Mb. It could be that this empty row is created before this update. The current max_execution_time is 30 seconds. What's a minimum/recommended value for manipulating large images?