I'm getting these errors when importing a custom content type using Content Multigroup fields.

* user warning: Unknown column 'delta' in 'order clause' query: SELECT * FROM content_field_video_file WHERE vid = 69 ORDER BY delta in /home/drupal/sites/all/modules/cck/content.module on line 1017.
    * user warning: Unknown column 'delta' in 'order clause' query: SELECT * FROM content_field_video_file WHERE vid = 70 ORDER BY delta in /home/drupal/sites/all/modules/cck/content.module on line 1017.

It happened when I exported a custom content type from my dev server to production server. I upgraded both to CCK 6.x-3.x-dev because I needed the Content Multigroup module to work.

Comments

Status:Active» Postponed (maintainer needs more info)

Need more information to reproduce the problem. Importing multigroups works fine for me in latest code, so this may be specific to the fields you're using and how you have them configured.

I ran into a similar problem. On my dev server, I set up a node with a CCK multigroup consisting of field_photo field_title, and field_description. Exporting this node and importing it to my stage server resulted in a "Unknown column 'delta' in 'field list' query" error generated by any View that used field_photo as a field. It seems that during the export/import procedure the content_field_photo table was altered to drop the delta column.

So I'm running the same CCK version and just got this error after importing a new content type. The field in question is used in three content types now (including the one just imported) and all had the number of values set to 1, so there was no delta column. But I found that one of the the now three content types had the number of values for this column switched to unlimited values, but the table in the database did not get restructured to have a delta value, hence the error. And of course the node view did not show a value for that field.

I was able to go into the field definition and change it back to 1 value. All seems fine now - no loss of data anywhere. So the issue is that the field count per node somehow got changed and I can only guess it was because another content type was imported that used that field, but I did not check immediately after doing the import. The site is a production site in heavy usage by a client, so it is not easy to duplicate the process and see if it happens again.

So I think this bug is more serious than I thought before. I have multiple content types using the same field, and some have it set to multiple and some set to 1. I just imported yet another content type with this field, with only one value. The import set the count to 1 for that field in all content types and even deleted the delta column in the database. So any nodes for content types that had multiple values either lost the extra values, or maybe it left multiple values in the table without a delta value. I set the field back to multiple, so delta column is back, but I don't know if those nodes - if they existed - now all have a delta of zero.

We have various backups so we will be able to figure out if any data was lost or corrupted, and the content type with multiple values was fairly new, so there weren't many nodes of that type. Overall the content table for this field has almost 50,000 rows in it.

If maintainers need any extra information, please fee free to contact my d.o account. It's unfortunate that this large production system has 3.0-dev loaded on it, but this was done well before I was involved. I don't even know how to determine when this dev version is from, or if it is safe to downgrade to 2.9 (or if this bug exists there).

I'm using the same field for this data so that it is all concentrated in one table in the database. But with this bug, if we need a new content type with the same field, I am inclined to create a new field to avoid these issues.

Version:6.x-3.x-dev» 6.x-3.0-alpha3

I think we just ran into the same problem. We added an existing field to a new content type, exported it as a feature for deployment, enabled the feature on the staging site, and started getting the 'unkown column "delta"' error on queries on the original content type. It seems that the feature import didn't realize that the column wasn't already multi and add the delta column. multi=1 in the feature, though. My workaround is to add the delta column as part of the new module.install. And move to D7 as quickly as possible.