Reflections on migrating to or from Drupal

Over the years we have carried out quite a bit of migration work, mostly to or between Drupal sites, but also from Drupal to other platforms such as Wordpress. From preparing outline migration reports with detailed analysis of field types and instances, to levering the power of Migrate and writing custom script and modules to wrangle the data into its new home, we have covered a lot of ground and learned a few things along the way.

Drupal 8 Core ships with migration tools out of the box and you can read more about this in general terms here: https://www.drupal.org/docs/8/api/migrate-api/migrate-api-overview

This blog post gives a very brief overview of the approach we have used to handle one specific case. We plan to add a bunch more posts, covering migrating from Plone to Drupal 8, from Drupal 7 to Wordpress, from Drupal 5 to Drupal 8, and some Drupal-specific challenges, such as img_assist to embedded images, node translation to entity translation ... and more. You will find them in the "related content" section on the right-hand side of this page.

CSV to Drupal 8: multilingual, categorised, file attachments

Many people have congratulated me on the website, but it is Netuxo staff who deserve that praise, not me. They turned an unwieldy collection of photos and information into a unique, bi-lingual, visitor-friendly and visually attractive resource. Thank you Netuxo!

Caroline Simpson, website owner, Qurna in the Sky

For many years, one of our clients had been collecting images and snippets of data about an Egyptian village that has now been demolished by the authorities. Her collection provides a view into a place and a people that are no longer visible - as she says "The built heritage of the Qurnawi meant nothing to them." The authorities saw their presence as a threat to the tombs and monuments of the Theban hills and between 2006 and 2009 systematically demolished homes and relocated people to settlements to the north.

Our challenge was to get the content online in an accessible form, in English and Arabic, with each image record categorised by theme or geographic area and with, where possible, caption details that included the name of the owner or family whose property it had been.

We started with a csv that had almost 900 rows of data that included:

  • A file name
  • A caption
  • A category
  • Plus... the same data in Arabic

- and a corresponding number of image files.

 

After some data massaging to sanitise filenames (spaces, duplicates, funny characters) and categorsiation, we were able to write a custom migration module that split and organised the data into a dependency-based workflow which allowed us to "join up" the base node with the correct file (including an automated ALT text and title) and its corresponding taxonomy term - and for each language.

The module allowed us to roll the migration back and forth, providing the opportunity for tweaking an improving the process as needed. The outcome was the creation of one node for each row of the csv, with an Arabic translation of each of those nodes.

Using a simple csv file as the data source for creating a large amount of translated Drupal nodes demonstrates the inherent power of the migration tools available within Drupal by default. See the results here: http://qurnainthesky.org