1

I'm trying to get Drupal 6 to automatically add a taxonomy term in a migration. Basically I have

// Some code
$this->addFieldMapping('field_supplier', 'source_supplier');

In this case, field_supplier is a taxonomy term. What I would like to achieve is for Drupal to check if the value in "source_supplier" is an already existing term, and in that case use that, otherwise it should create a new one and use that. I tried using

$this->addFieldMapping('field_supplier:create_term', 'source_supplier');

and

$this->addFieldMapping('field_supplier', 'source_supplier')->arguments(array('create_term' => true));

But it didn't work. Any ideas? Thanks!

Your Answer

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

Browse other questions tagged or ask your own question.