Unless your content model is extremely simple, the changes to a content type’s fields are usually pretty significant. However, I recommend against migrating content and vocabulary types. This would allow us to use the migration_lookup plugin here. Note that vid is a machine name in D8 and an integer in D7, so you will have to do a translation of it somehow.Īn additional note here about vocabularies: As noted in my previous posts, it’s also possible to migrate the vocabularies themselves. Were we migrating several vocabularies at once, the static map plugin would probably be how we’d handle this. Because we are doing a migration of a single vocabulary, we are simply setting it to a constant value. There are a number of ways to deal with a taxonomy term’s vid. In this case, we’re using Drupal’s core entity handler for taxonomy_term. The destination plugin defines what we’re making out of that data, and the format it ends up in. In this case, we are using Drupal core’s d7_taxonomy_term plugin.īundle tells us what type of term we’re loading in this case the example_category. The source plugin defines where we are getting our data, and what format it’s going to come in. This saves us the heavy lifting of writing SQL to load all those field values ourselves. When migration loads the taxonomy term, the Deriver goes and loads all the field values from the source database and attaches it to the term. This is a component within the Drupal 8 core taxonomy module. deriver: Drupal\taxonomy\Plugin\migrate\D7TaxonomyTermDeriver Wow again! As is often the case, there’s lots of things going on here. # Only attempt to stub real (non-zero) parents. This example is based on the migration template file from the core taxonomy module.Įxample_migrate/config/install/migrate_category.yml # Migration for category taxonomyĭeriver: Drupal\taxonomy\Plugin\migrate\D7TaxonomyTermDeriver In this case, Category is a taxonomy vocabulary that has two fields: name (the taxonomy term itself) and description. As we did with user migrations in our previous post, we will assign all the taxonomy migrations to our general migration group. Taxonomies are a ‘fieldable entity’ type, much like users and nodes. Categories and TagsĬategorization and tagging in Drupal is managed through the use of taxonomies. We’ll be building on some of those concepts here. If you haven’t read through the previous installments in this series, I highly recommend you do so. In this post, we’ll delve into node and taxonomy migrations, which is where the bulk of the content in most sites is stored. Managing Your Drupal 8 Migration - Key concepts, setting up the tools, and starting with a user migration.Estimating Drupal 8 Migration Scope - How long will all this take?.Drupal 8 Content Migration: A Guide For Marketers - What content should we migrate, and how do we organize and plan a migration?.We’ve already covered some important migration information on our blog: Migration is a complex and interesting topic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |