Hi, ever since upgrading to 6.4, I've been getting this error when I try to upload a new image using image picker:
user warning: Duplicate entry '0' for key 1 query: INSERT INTO imagepicker (uid, img_name, img_title, img_description, img_date) VALUES ('1', '01Create quiuz.jpg', '', '', '2008-09-03 17:21:12') in path/to/sites/all/modules/imagepicker/imagepicker.upload.inc on line 156.
Error while saving information to database for uploaded image.

Please help! I want my image picker back! this is using both the 6.x-1.x-dev (2008-Aug-29) and the version from Sept. 1.

Thanks,

Ellen

Comments

hutch’s picture

Oh dear!
First of all check that you have run any updates, by going to Status Report and checking there.
Failing that, if you have access to phpmyadmin (or something similar) you should check that the img_id field in the imagepicker table has auto increment set, I suspect that somehow that has not been set. The original imagepicker way back when did not have this ;-(
Either way, please report back!

EllenM1-1’s picture

Thank you SO MUCH - adding the auto-increment to that field worked! I'm not sure why my table was out of sync. I upgraded to D 6.4 from 5.9 recently, and have been replacing all the old modules as they become available.

hutch’s picture

Assigned: Unassigned » hutch
Status: Active » Fixed

Good, problem solved.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.