Drupal

Migrate D2D: Taxonomy and Files Fields

Migrate D2D: Taxonomy and Files Fields

Having trouble migrating taxonomy terms and files with the migrate_d2d UI? Don't worry... it's just a matter of configuration.

Taxonomy Terms:

When mapping fields from source to destination, there are a few fields per taxonomy term to migrate. Before you begin, though, the vocabularies need to exist on the destination site.

Each term will have 2 rows to configure: taxonomy_term_reference and option [field-name]_terms:source_type. For example, if our term field was named field_category, the second option row we would need to configure would be field_category_terms:source_type.

Setting taxonomy_term_reference is more intuitive than the other. Simply set the destination to the field you would like the source to map to. Then set the last column to the related taxonomy migration. For example, if our migration was named Example and the vocabulary was category, then the selection in the last column would be ExampleTermcategory.

The next part is not so intuitive. Directly under the taxonomy_term_reference row should be the field_category_terms:source_type row. [If your field was named field_category]Simply set the default value in this row to "tid".

File Fields

For the sake of this explanation, our file field is named field_files.

For files, there are 3 rows to configure: field_files, option field_files:file_class and option field_files:presserve_files.

Set the destination of field_files to the file field you would like the source to map to. Then, set the last column to the related taxonomy migration. For example, if our migration was named Example then the last column would be set to ExampleFile.

Directly under the field_files row should be the field_files:file_class row. Set the default value in this row to "MigrateFileFid".

Directly under the field_files:file_class row should be the field_files:presserve_files row. Set the default value in this row to "TRUE".

That's it! Once your term reference and file fields are configured, your migrations should relate the destination fields appropriately.

Happy Migrating!

Up Next

Ready To Get Started?

Schedule a complimentary 30-minute strategy consultation with one of our Drupal experts as early as today. We promise...they don't bite!