Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Some users have reported errors like (#781088-111: Updating CCK Fields and Data from D6 to D7)
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=8285&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'node-2381-0-0-und' for key 'PRIMARY': INSERT INTO {field_data_field_hon_id} (entity_type, bundle, entity_id, revision_id, language, delta, field_hon_id_value) 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] => continuouspublication [:db_insert_placeholder_2] => 2381 [:db_insert_placeholder_3] => 7723 [:db_insert_placeholder_4] => und [:db_insert_placeholder_5] => 0 [:db_insert_placeholder_6] => CP00002 ) in drupal_write_record() (line 6776 of /Users/cnolle/Desktop/dev/cope7/includes/common.inc).
in the content migrate module.
I've had this error as well on nodes which have several revisions. I think we should only be inserting the most-recent revision into field_data_field_NAME, instead of all revisions.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1043956-tests-and-fix.patch | 5.69 KB | bfroehle |
#1 | 1043956-work_with_revisions.patch | 1.81 KB | bfroehle |
Comments
Comment #1
bfroehle CreditAttribution: bfroehle commentedIs this a correct approach in fixing things? It works for me at least...
Comment #2
bfroehle CreditAttribution: bfroehle commentedIncluding the same patch as in #1, and a test routine. :)
Comment #3
KarenS CreditAttribution: KarenS commentedWorks great for me, committed.
I think there is something wrong with the tests (not just these tests, all tests), I am only seeing the data setup, not the tests themselves. I'm going to create a separate issue for that though, I believe the revision handling is now working right.
Comment #4
bfroehle CreditAttribution: bfroehle commentedKarenS: The fact that all tests fail is #1044032: content migrate tests fail: BLOB/TEXT column can't have a default value.
-Brad
Comment #5
KarenS CreditAttribution: KarenS commentedYeah, I suspected that. Can you please link those two issues together?
Comment #6
bfroehle CreditAttribution: bfroehle commentedSorry, I don't know what you mean.
Comment #7
KarenS CreditAttribution: KarenS commentedPost a comment on each one with a link to the other. They're not duplicates, but they're related.