I suddenly encounter the above error when trying to create a new content of my Content Type "Event":
SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_event_image_width' at row 1
This is the first time I see this error after updating from Drupal7. It was ok a week ago and before. In this week I updated a block and another event node text content. I also did some trials to run cron job for Civicrm module, via cPanel Cron Jobs command setup. Civicrm is using a separate database. The cron job setup wasn't successful for some reasons which I'm still trying, but it's a separate issue.
I've tried to restore database using Backup and Migrate to a week before, and replaced those config files in 'active' folder. But the problem was not resolved.
Also noticed that if I save the content as draft, the error didn't happen, the node will render and display.
Am not sure what I should further attempt to rectify this problem. Have downloaded sql backup files from cPanel JetBackup feature, but thought I should hear from the experts here before I explore further. I also wonder what would have caused this, since nothing that I did last one week should have affected the codes...
Thank you!
BK
Comments
Hi blimking,
I doubt you can solve this via cPanel or dump restore...
That column field_event_image_width - what does it belong to? How do values get set for that?
The value is empty, but the column seems to be defined as "integer" for which an empty string is invalid.
Hi indigoxela, thanks for the input. I looked further before replacing the SQL, and found Status Report page showing two php "gd" related issues. Then I realised I noticed some php red rows in Log Messages while checking on whether cron was running in the past week. After the php was switched from 7.2 (current) to 7.3, the event node update was resolved!
I traced back to the date when php extension started to fail was when I started to run this command in cPanel Cron Jobs.
Will a command like this cause the php failure? Or it's possible the php codes/files just run corrupted with no good reason?
Thank you!
Oops, do you remember which ones? The column name "field_event_image_width" might be an indicator, that a broken/incomplete gd setup broke your site.
Is gd fixed now on your site? Or is there still nagging on your status page? If so, please try to fix the gd setup first.
I wouldn't assume that a GET request breaks anything, no. :-)
Yes it's fixed after switching the php from 7.2 to 7.3, the warning disappear and I'm able to update the event node (with image upload) without issue.
Because it happened the same time when I was meddling with Civicrm cron job setup (which still leads me to no where), so I was afraid of making further testing... 😂
Thanks for sharing!