user warning: Table 'cyberfan.content_type_gallery_image' doesn't exist query: SELECT count(field_gallery_image_fid) FROM content_type_gallery_image WHERE field_gallery_image_fid = 62 in /home/cyberfan/htdocs/sites/all/modules/filefield/filefield.module on line 924.

Getting this error and I lost my images for my created content type. Please help!


quicksketch’s picture

Getting this error and I lost my images for my created content type. Please help!

It's hard to say what the problem is when we don't know how to reproduce it or what caused it. This isn't a problem that occurs on a fresh installation of FileField. As noted in the error, it sounds like a table is missing that should be there. Have you done manual queries to your database or tried to do a backup/migrate recently?

It may be that the data has been moved from the "content_type_gallery_image" to a separate table "field_gallery_image", if you changed the field from a single-value field to a multivalue field. However this is normal and it shouldn't cause errors. You might try editing your gallery image file field and setting its value back to "1", perhaps that would help by putting the data back in the original location. If there is no table content_type_gallery_image or a table for field_gallery_image, your database is missing critical information and your only way out is to restore a database backup.

njathan’s picture

I get the same error.
This happened when i enabled the module the second time.

The first time, i had the image_gallery module (belonging to the image module) enabled. This was causing a minor confusion. I then disabled and eventually uninstalled both image_gallery and views_gallery, as well as all related modules that both of them depended on. Then i enabled the views gallery module and the respective dependencies... to find this error. I cannot upload images in the sample gallery content (that comes with the module). When i attempt saving it says:

    * user warning: Table 'silverxt_pub.content_type_gallery_image' doesn't exist query: SELECT COUNT(*) FROM content_type_gallery_image WHERE vid = 20 in /home/silverxt/public_html/nj/sites/all/modules/cck/content.module on line 1051.
    * user warning: Table 'silverxt_pub.content_type_gallery_image' doesn't exist query: INSERT INTO content_type_gallery_image (vid, nid, field_gallery_image_fid, field_gallery_image_list, field_gallery_image_data, field_gallery_nid) VALUES (20, 20, 134, 1, 'a:3:{s:11:\"description\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:5:\"title\";s:0:\"\";}', 18) in /home/silverxt/public_html/nj/sites/all/modules/cck/content.module on line 1213.
    * user warning: Table 'silverxt_pub.content_type_gallery_image' doesn't exist query: SELECT * FROM content_type_gallery_image WHERE vid = 20 LIMIT 0, 1 in /home/silverxt/public_html/nj/sites/all/modules/cck/content.module on line 993.

I hope this helps in reproducing the error

njathan’s picture


It seems that one should not let filefield auto-enable itself when imagefield is enabled.... manually enable filefield first, save, then enable imagefield, save. Things look to be working smooth..

This may be a lame workaround... but it just works.

quicksketch’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Closed (fixed)

This was probably caused by #492166: Imagefield module gets disabled on upgrade, or unexpectedly on running cron, which has been fixed in the latest releases of ImageField. Please reopen if this problem can be reproduced from a clean installation.

Omar Alahmed’s picture

@ #1 Thank you quicksketch, it was cck multi value and the database user hasn't permission to create a new table. it worked after return the field number of values to "1"