Problem/Motivation

Reimporting content from Drupal 7 to Drupal 8/9 results in duplicate entry error, when there is new created content on new site

Steps to reproduce

migrate some content from d7. Create new content on Drupal 8/9 site. then redo migrate-import. results in duplicate entry errors. for node_complete migrations.

[error] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '824f7429-533e-485c-a5df-b7b56202bbe8' for key 'node_field__uuid__value': UPDATE "node" SET "vid"=:db_update_placeholder_0, "type"=:db_update_placeholder_1, "uuid"=:db_update_placeholder_2, "langcode"=:db_update_placeholder_3
WHERE "nid" = :db_condition_placeholder_0; Array

Proposed resolution

i am looking for a solution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

nojj created an issue.

sarguna raj m’s picture

Hello,

Is there any workaround for this issue? My thought is that we need to remove/truncate the data entirely and reimport it again?

Thanks.

vlyalko’s picture

Hi, anyone figured out the solution for it? I, also, thought, deleting previously migrated content, would help avoid this error, but it did not help

mohammad-fayoumi’s picture

The steps I took to resolve this problem are as follows:

  1. Create a custom processor for the nid
  2. Verify whether the entity's id is present in the migration map table.
  3. If yes, then return the destid1 back in the processor