0

I'm wondering if there is something special I need to do within the UI when using Drupal-to-Drupal data migration to actually get taxonomy terms to port over with all my nodes. I get an error that reads

No matching taxonomy term found for source value '144' in vocabulary Topics.

I've created first level terms and ported over each term correctly, but what is the special thing I need to do to actually map the terms with the nodes? I've mapped the TID and yet it still doesn't work. Is there something special Im missing?

  • How did you map them over? did you create a separate migration job for the taxonomy terms? – digital Jan 13 '14 at 23:02
  • Correct. I used the d2d module to port over all of the terms first then then ported the nodes over and mapped them to those terms. This was all done via the UI in d2d's new wizard – doodirock Jan 14 '14 at 0:40
  • If it's a bug in d2d, you should post it in their issue queue, not here. Unless you are willing to fix it yourself, then we may help, but at leas try to find responsible part of code and show us the excerpt of it, describing what about editing it is problematic. – Mołot Jan 14 '14 at 8:40
  • Would you want to try this module as a different approach to migration as it retains original ids for various things - data_export_import – therobyouknow Jan 14 '14 at 9:53
  • Thanks @Mołot. I did post in the issue queue before coming here to let them know, but I wasn't 100% sure it was a bug or just my own user error. In terms of code, this all comes out of D2D's UI so I'm not sure if or what code to post. – doodirock Jan 14 '14 at 17:51
1

Well, this is a couple years' old now, but thank you doodirock for tickling my memory on this. You need to configure that field's source_type value to 'tid'. I'm doing so in code, but I believe that you can set this in the UI. The code you need is this:

$this->addFieldMapping('field_news_categories:source_type')
  ->defaultValue('tid');

In my UI view, this row appears like this:

enter image description here

Where 'tid' is the value input.

As the documentation points out:

source_type: If the option value is 'tid', then the incoming value is assumed to be a valid term ID in the destination Drupal instance. Otherwise, it is assumed to be a term name (the default behavior). Note that you'll want to set this to 'tid' if the mapping has a source migration (the sourceMigration() method is used on the mapping).

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.