0

I have written a custom Migration tp import redirects (D7 -> D7).

Everything is working fine. Imports were successful, rollbacks are working fine etc.

However, I am getting Processed XXXX (0 created, 0 updated, 0 failed, 0 ignored) in XX seconds (XXXXX/min) message after import.

Why is not showing the number of items created?

Is there a method in destination plugin or migration where I need to return this count or return TRUE/FALSE for each row processed or something like that?

0
0

Got answer!!

I missed the following code from the abstract class MigrateDestination:

/**
 * Maintain stats on the number of destination objects created or updated.
 *
 * @var int
 */
protected $numCreated = 0;
public function getCreated() {
  return $this->numCreated;
}
protected $numUpdated = 0;
public function getUpdated() {
  return $this->numUpdated;
}

These variables need to be updated during the import process and need to be defined/updated in class that is extending the MigrateDestination.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.