At the top of MigrateDestinationEntityAPI::import(), there's a check on whether the entity was previously migrated. If not, the entity ID is unset.

  public function import(stdClass $entity, stdClass $row) {
    $migration = Migration::currentMigration();

    // Updating previously-migrated content?
    if (isset($row->migrate_map_destid1)) {
      if (isset($entity->{$this->id})) {
        if ($entity->{$this->id} != $row->migrate_map_destid1) {
          throw new MigrateException(t("Incoming id !id and map destination id !destid1 don't match",
            array('!id' => $entity->{$this->id}, '!destid1' => $row->migrate_map_destid1)));
        }
      }
      else {
        $entity->{$this->id} = $row->migrate_map_destid1;
      }
    }
    else {
      unset($entity->{$this->id});
    }

This is a problem if our system of record is Migration::DESTINATION, which throws a "no destination id provided" error.

Looking through the git history, it looks like this was introduced in #1530848: Entity API plugin: various cleanups and improvements.

CommentFileSizeAuthor
#1 migrate_extras-1822616.patch408 bytesles lim

Comments

les lim’s picture

Status: Active » Needs review
StatusFileSize
new408 bytes

Patch attached.

mikeryan’s picture

Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

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