Creating one of each term is quite enough, thanks

This commit is contained in:
benjamin melançon 2023-11-16 11:17:26 -05:00
parent 0f38648507
commit aa510febea

View file

@ -90,6 +90,11 @@ function migration_helpers_move_terms(
$new_term->save();
$tid = $new_term->id();
\Drupal::logger('mass')->log(LogLevel::INFO, "Term $term_name created with TID $tid in vocabulary $destination_vocabulary.");
// Because we did the query only once, before we entered this loop, we
// need to add our newly created terms to the term data array we use to
// check for existing terms… or we'll keep creating duplicates.
$term_data[$new_term->id()] = $new_term->label();
}
$tids[] = $tid;
}