how to migrate a multi-value term reference field? I am setting up a drupal migration where the destination node contains a multi-value taxonomy term_reference field, called 'field_features'. The machine name of the drupal taxonomy vocabulary of the field is called 'voc_features'.

My field mapping for this field is configured like this:

$this-&gt;addFieldMapping('field_features:create_term')-&gt;defaultValue(true);
$this-&gt;addFieldMapping('field_features:ignore_case')-&gt;defaultValue(true);

//i don't have tid's in the source, so i leave the source_type for what it is
$this-&gt;addUnmigratedDestinations(array('field_features:source_type'));

//i link the drupal vocabulary to the multivalue field.
$this-&gt;addFieldMapping('voc_features', 'field_features')-&gt;separator('|');


The terms are added in the 'voc_features' vocabulary, but not in the 'field_features' field.

When i add the field mapping like i do with all the other fields:

//my source fields have the same name as my destination fields
$this-&gt;addFieldMapping('field_features', 'field_features')-&gt;separator('|');


i get the following error:

strtolower() expects parameter 1 to be string, array given File ...\sites\all\modules\migrate\plugins\destinations\fields.inc, line 402

Other single value term_reference fields import just fine.
What am i missing?
Yes. The migration of term doesn't allow to migrate multi-value. You have to process the source ahead.


Create a new migration and import the data to terms of vocabulary named 'voc_features' at first.
Add a dependence to your current migration using previous migration. Such as $this-&gt;dependencies = array('MigrateXXXMigration');.
The field mapping should be like this,$this-&gt;addFieldMapping('field_features', 'Features')-&gt;arguments(array('source_type' =&gt; 'tid'));
In the function prepareRow($row), you should prepare the Features field and put it into your $row variable. $row-&gt;Features=array(tid1,tid2,tid3);. The 'tid1','tid2' and 'tid3' should be replace the live tid from your term tables.