Migrating multilingual data into Drupal 8

First thing, have a D6 site with multilingual things ready to go! This node has a file attached (see end of post) with a copy of D6 with some translated nodes and site information (see settings.php file settings to translate these variables). The file is a drush archive.

D6 "Requirements" at this time:

  • It must have CCK installed (2014-04-11)
  • Recommended to install in the non-English language if you wish to download the translations automatically (this isn't working in the UI yet 2014-04-11). You can also go download the translations manually later.

Setting up D8

Currently we do not work from the main branch as there are significant changes happening in this area of Drupal 8. Some things may be broken. You have been warned! Please test and update issue summaries where appropriate.

  • Clone the IMP migration sandbox and install Drupal 8 https://drupal.org/sandbox/chx/2105305
  • Enable migrate, migrate_drupal, content_translation, configuration_translation, locale/"Interface Translation", language (these last two are installed by default if you did not install in English)
  • Enable English as a language
  • Get the patch so you can bind to a second database in D8 https://drupal.org/node/2181775
  • Create a manifest.yml file in the root

Migration Mappings

Put this file int he root of your D8 site. If you did migrations to D7 with the latest versions of migrate and d2d, this file similar to your migrate.inc file registration array (but in a completely new format).


# nodes
- d6_user_role
#- d6_user (not working yet - "does not meet requirements" 2014-04-11)
- d6_language_types # Patch needed 2014-04-11 https://drupal.org/node/2225293
- d6_language_negotiation # needs above patch
- d6_language # Patches needed 2014-04-11 https://drupal.org/node/2166875 and https://drupal.org/node/2234623

- d6_filter_format

- d6_node_type
- d6_node_settings # gets story content type
- d6_node:*
- d6_node_body_field

- d6_view_modes

You can find the complete list of migrations at core/modules/migrate_drupal/migrate.config.yml and core/modules/migrate_drupal/migrate.content.yml some (like d6_user are not yet working 2014-04-11).

Running the Migration

Then, on the command line, run your manifest file. I used a D6 database with no password because of the bug mentioned above.

drush migrate-manifest mysql://d6@localhost/d6 manifest.yml

You will need the latest Drush if you want support D8! A UI-based workflow is being developed here: https://drupal.org/node/2200379

Rolling Back

This does not exist yet, but if you are familiar with doing this manually in D7 the process is the same:

Use the UI to delete the affected things (in this example, delete your nodes)
Clear the database table that stores the migration info for the specific migration: mysql> delete from migrate_map_d6_node;

Other howtos

Writing D6 to D8 entity migrations - https://groups.drupal.org/node/387488
How to test Drupal 6 to Drupal 8 migrations - https://groups.drupal.org/node/398588
eliza411 - http://dspeak.com/fldc14/dothis.html

More information on Migrate in Core / IMP

You can follow the initiative at groups.drupal.org/imp.