CCK 6.x-2.6
ImageField 6.x-3.3
Permissions 777 Public
Upgraded to newest version of imagefeild and now receiving these messages, all images on the site aren't being displayed.

    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "delta" does not exist LINE 1: ...FROM content_field_image_cache WHERE vid = 60 ORDER BY delta ^ in /var/vwww/johnmurrayphotographer/html/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT * FROM content_field_image_cache WHERE vid = 60 ORDER BY delta in /var/vwww/johnmurrayphotographer/html/sites/all/modules/cck/content.module on line 993.
    * warning: pg_query() [function.pg-query]: Query failed: ERROR: column "delta" does not exist LINE 1: SELECT vid AS _vid, delta as _delta, nid AS _nid, field_imag... ^ in /var/vwww/johnmurrayphotographer/html/includes/database.pgsql.inc on line 139.
    * user warning: query: SELECT vid AS _vid, delta as _delta, nid AS _nid, field_image_cache_fid AS fid, field_image_cache_list AS list, field_image_cache_data AS data FROM content_field_image_cache WHERE vid IN (30,46,61,25,49,53,72,44,71,32,29,27,33,38,69,39,60,62,26,36) ORDER BY _nid ASC, _delta ASC in /var/vwww/johnmurrayphotographer/html/sites/all/modules/cck/includes/views/handlers/content_handler_field_multiple.inc on line 170.

Could someone help me out with this? I'm not having any luck getting it to work.

Comments

dmurray’s picture

Update permissions are 755 not 777 on the temp directory, the field is called field_image_cache and was created by ubercart. All images on the site are just different image cache presets of this field.

quicksketch’s picture

It sounds like the problem you're having is with your database, not the actual files themselves. As noted in the warnings you're getting, CCK can't find the "delta" column in the table "content_field_image_cache". I'm not sure what would cause this column to suddenly vanish, but you my try editing the field and changing its "Number of values" option to 1 and then back to Unlimited (back up your database first though). That should force CCK to recreate the tables, but it might just cause a bunch of errors and fail.

dmurray’s picture

I found a similar issue here #383330: Product Kit is missing the Image field! (Unknown column 'node_data_field_image_cache.delta') and the workaround was documented on comment #16, That cleared the errors and allows me to add new items but all the images are gone as of now so I have to re-upload them. I don't know if this is an issue with filefield or ubercart but the workaround was to edit the imagefield and set the allowed values to 1 then back to unlimited. (trying to not look at the disclaimer in imagefield that says "Warning! Changing this setting after data has been created could result in the loss of data!")

In that other thread there's steps to recreate the issue as well.

quicksketch’s picture

Status: Active » Fixed

Thanks dmurray, I'm marking this fixed as a support request, though it's actually a duplicate of #383330: Product Kit is missing the Image field! (Unknown column 'node_data_field_image_cache.delta') (nice find there). Since ImageField isn't responsible for its own data storage, this sounds like Ubercart or CCK are culprits in causing the problem.

Status: Fixed » Closed (fixed)

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

elijah lynn’s picture

Just want to add some feedback for the internet to search.

I was getting the below error on latest recommended of ImageField 6.x-3.10 and CCK 6.x-2.9:

Unknown column 'delta' in 'order clause' query: SELECT * FROM content_field_image WHERE vid = 1225 ORDER BY delta in /home/elijah/websites/loc.windwalkerexpeditions.com/sites/all/modules/contrib/cck/content.module on line 993.

I am not sure what exactly caused this but the content_field_image table is missing the "delta" column. If I go to one of the content types that uses this field, it is set to "unlimited" and if I set it to "1", save, then set back to "unlimited" the "delta" column is recreated and all is well again but it will delete any extra images that were attached previously. I recently upgraded and am also using features. This isn't the greatest fix because of the reason mentioned above. I am not using Ubercart on this site so not quite sure what is going on here. If anyone knows more about why it happened that would be appreciated.