I'm working on an D6->D7 upgrade and for that purpose I would like to use file_entity. During the process, I am migrating many fields (from CCK). After enabling the file_entity module, I use drush queue-run file_entity_type_determine as suggested here to determine/classify the file meta data (type etc.).

That works fine, but I get some strange PDOException errors during that process. One regards field_bild which is an image field with unlimited possible values. In total there are 25 images which leads to 274 placeholders (I'm not sure why it's not 275). The structure is like this, but I deleted the data for images 3-25:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node-120538-0-0-und' for key 'PRIMARY': INSERT INTO {field_data_field_bild} (entity_type, entity_id, revision_id, bundle, delta, language, field_bild_fid, field_bild_alt, field_bild_title, field_bild_width, field_bild_height) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10), (:db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19, :db_insert_placeholder_20, :db_insert_placeholder_21); Array
(
    [:db_insert_placeholder_0] => node
    [:db_insert_placeholder_1] => 120538
    [:db_insert_placeholder_2] => 147983
    [:db_insert_placeholder_3] => foto
    [:db_insert_placeholder_4] => 0
    [:db_insert_placeholder_5] => und
    [:db_insert_placeholder_6] => 10723
    [:db_insert_placeholder_7] => 
    [:db_insert_placeholder_8] => [FIELD_TITLE] 
    [:db_insert_placeholder_9] => 1000
    [:db_insert_placeholder_10] => 1000
    [:db_insert_placeholder_11] => node
    [:db_insert_placeholder_12] => 120538
    [:db_insert_placeholder_13] => 147983
    [:db_insert_placeholder_14] => foto
    [:db_insert_placeholder_15] => 1
    [:db_insert_placeholder_16] => und
    [:db_insert_placeholder_17] => 10724
    [:db_insert_placeholder_18] => 
    [:db_insert_placeholder_19] => [FIELD_TITLE]
    [:db_insert_placeholder_20] => 1240
    [:db_insert_placeholder_21] => 827
)
 in field_sql_storage_field_storage_write() (line 514 of /modules/field/modules/field_sql_storage/field_sql_storage.module).
Drush command terminated abnormally due to an unrecoverable error.

The other one is about field_body, but this one doesn't happen on each try:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node-120538-0-0-und' for key 'PRIMARY': INSERT INTO {field_data_body} (entity_type, entity_id, revision_id, bundle, delta, language, body_value, body_summary, body_format) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8); Array
(
    [:db_insert_placeholder_0] => node
    [:db_insert_placeholder_1] => 120538
    [:db_insert_placeholder_2] => 147983
    [:db_insert_placeholder_3] => foto
    [:db_insert_placeholder_4] => 0
    [:db_insert_placeholder_5] => und
    [:db_insert_placeholder_6] => [NODE_BODY]
    [:db_insert_placeholder_7] => [NODE_SUMMARY]
    [:db_insert_placeholder_8] => 2
)
 in field_sql_storage_field_storage_write() (line 514 of /modules/field/modules/field_sql_storage/field_sql_storage.module).

The only pattern I have found so far is that these errors seem to occur on one node type (called "foto") only, but in my test run only on 3 out of 5 of them. Any ideas what could be wrong here?

Comments

yan created an issue. See original summary.

yan’s picture

I noticed some more errors regarding field_data_taxonomy_vocabulary_1:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node-126367-0-0-und' for key 'PRIMARY': INSERT INTO {field_data_taxonomy_vocabulary_1} (entity_type, entity_id, revision_id, bundle, delta, language, taxonomy_vocabulary_1_tid) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6); Array
(
    [:db_insert_placeholder_0] => node
    [:db_insert_placeholder_1] => 126367
    [:db_insert_placeholder_2] => 155408
    [:db_insert_placeholder_3] => nachricht
    [:db_insert_placeholder_4] => 0
    [:db_insert_placeholder_5] => und
    [:db_insert_placeholder_6] => 4
)
 in field_sql_storage_field_storage_write() (line 514 of /modules/field/modules/field_sql_storage/field_sql_storage.module).
Drush command terminated abnormally due to an unrecoverable error.

Looking for a possible source, I found out that there are no errors when I run drush queue-run file_entity_type_determine without having enabled some other modules. But I haven't been able to find out which module possibly causes the error.

yan’s picture

Status: Active » Fixed

I'm not sure, but I think this error was caused because I accidentally enabled the image module (instead of the core module with the same name in D7). At least the error message doesn't appear when I use the core module.

Status: Fixed » Closed (fixed)

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