Migrating Taxonomy from D6 to D7

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by vfranklyn on January 23, 2015 at 8:12pm

Hi there,

PPLD.org is upgrading from D6 to D7 using a clean D7 instance and migrating data either via Migrate module, or via Feeds somehow. Here’s what is stumping me:

We have over 3,000 taxonomy terms/tags. Every node has at least one taxonomy term attached to it. We have over 11,000 nodes. I'm trying to figure out the best way to import our taxonomy from our D6 site to our D7 site. I think I need to make sure the tids (and vids I think) stay the same so the nodes are properly tagged. Is that right? What would be the best way to do this? I'm looking at Migrate module, but it's confusing. If it's the way to go, I'll devote brain time to figuring it out. Otherwise, should I just enter them by hand and make sure the tids match up? Also, I hear D7 dispensed with vids and uses machine names now. Does that screw up the tagging on the nodes either way? Will I have to touch every node?</brain explodes>

Has anyone migrated a D6 library site (with tons of taxonomy for subject guides) to D7 successfully? I’d love to hear from you!

Any guidance you can offer is greatly appreciated.

Best,

Virginia

Virginia Franklyn
Web Developer
Pikes Peak Library District
719-884-9654
http://ppld.org/

Comments

Migrate maps the tids

Posted by sreynen on January 25, 2015 at 5:59pm

Migrate can maintain the old tids, but that process is complicated. The more common way to handle this is to map the old tids to the new tids, which migrate makes relatively easy. When you run the term migration, it will create a table in the database named something like migrate_map_tag (where "tag" is he name of your migration), and that table will save the mapping between old and new tids (sourceid1 is old tid, and destid1 is the new tid).

Then in the node migration, you tell it to use the term migration to translate old to new in the field mapping, which looks something like this in code:

$this->addFieldMapping('field_new_tags', 'field_old_tags')->sourceMigration('tags')->separator(',');

That "sourceMigration" part is enough to translate the tids.

You may also be interested in https://www.drupal.org/project/normi which I wrote to make it a little easier to work with migrate. It auto-generates the module code for you, so you only need to write SQL queries, and it also templates those queries for you.

Thanks so much for the

Posted by vfranklyn on January 26, 2015 at 10:18pm

Thanks so much for the information, sreynen! I'm going to try Migrate_d2d first. If that doesn't work, I'll be trying your instructions. I appreciate you taking the time to respond.

Hi there. Thanks to some

Posted by vfranklyn on April 6, 2015 at 9:02pm

Hi there. Thanks to some advice from the good folks at Duo Consulting, I've managed to successfully migrate my data (well, in the process of anyways) using d2d 7.x-2.1-rc1

Here's some documentation:

http://ppld.org/sites/default/files/d2dmigrationdocumentation.pdf

Hope this helps!

Drupal Colorado

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /