Question

After upgrading drupal core 6 to 7. All fields migrated but images field can not migrate. it is rollback and here is exception error

Requesting rollback of field "field_images" due to failure to convert record:

array ( 'entity_id' => '1634',
        'revision_id' => '1634',
        'field_images_fid' => '5072',
        'field_images_data' => 'a:2:{s:3:"alt";s:12:"Bathroom.jpg";s:5:"title";s:8:"Bathroom";}',
        'delta' => '2',
        'entity_type' => 'node',
        'language' => 'und',
        'bundle' => 'business',
        'field_images_alt' => 'Bathroom.jpg',
        'field_images_title' => 'Bathroom',
        'field_images_display' => '1', )

Cause:

exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'public://tips/Bathroom.jpg' for key 'uri'' in E:\wamp\www\travel-local\includes\database\database.inc:2168 Stack trace: #0 E:\wamp\www\travel-local\includes\database\database.inc(2168): PDOStatement->execute(Array) #1 E:\wamp\www\travel-local\includes\database\database.inc(680): DatabaseStatementBase->execute(Array, Array) #2 E:\wamp\www\travel-local\includes\database\mysql\query.inc(36): DatabaseConnection->query('INSERT INTO {fi...', Array, Array) #3 E:\wamp\www\travel-local\includes\database\query.inc(1621): InsertQuery_mysql->execute() #4 E:\wamp\www\travel-local\sites\all\modules\cck\modules\content_migrate\modules\content_migrate.file.inc(285): MergeQuery->execute() #5 E:\wamp\www\travel-local\includes\module.inc(1101): file_content_migrate_data_record_alter(Array, Array, Array, NULL) #6 E:\wamp\www\travel-local\sites\all\modules\cck\modules\content_migrate\includes\content_migrate.admin.inc(410): drupal_alter('content_migrate...', Array, Array, Array) #7 [internal function]: _content_migrate_batch_process_migrate_data('field_images', Array) #8 E:\wamp\www\travel-local\includes\batch.inc(284): call_user_func_array('_content_migrat...', Array) #9 E:\wamp\www\travel-local\includes\batch.inc(161): _batch_process() #10 E:\wamp\www\travel-local\includes\batch.inc(80): _batch_do() #11 E:\wamp\www\travel-local\modules\system\system.admin.inc(2365): _batch_page() #12 [internal function]: system_batch_page() #13 E:\wamp\www\travel-local\includes\menu.inc(517): call_user_func_array('system_batch_pa...', Array) #14 E:\wamp\www\travel-local\index.php(21): menu_execute_active_handler() #15 {main}

Was it helpful?

Solution

Its your data problem. you might have unique constraint to any of your column in the table. it may also be your primary key in which you are going to add the replicated data. So find out the column on which you have integrity check (either primary key check or unique constraint) and now down the its values...if the values of the records that are being inserted is the same then it will raise this issue.

"Find out your images column has unique constraint on it...edit this column remove this constraint and it should be working."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top