Drupal Migrate API

Posts on a project page such as this one are sorted in ascending chronological order.


Project: Drupal Migrate API
Tags: Drupal 8, Nested Paragraphs, Multilingual, Migrate API

Blaire, a Digital Communications VP, reaches out to me for help in creating 80 pages of content in a soon to be launched Drupal 8 multilingual corporate website.

The first challenge is that these pages need to be created on an island of sort i.e. in an environment which is completely separate from the main contractor's environment - «in fact without them knowing about it would be best for a while...».

The second challenge is where it gets… exponentially? complicated: most of the multilingual nodes' content resides in nested Paragraphs, three (3) levels deep, that's a lot of referenced entities.

- Title
- field_paragraphs_level_1
	- field_padding
	- field_container_size
	- field_paragraphs_level_2
		- field_padding
		- field_title
		- field_paragraphs_level_3
			- field_padding
			- field_wysiwyg_content

The closest I go to this was 5 years ago when I used Feeds to import 1000 products into a Drupal Commerce 1.x store. The way to do this is to first import/create the referenced entities (product variations) before importing the host entities (product display nodes). To be clear, that's equivalent to just 1 level of nesting.

Although I have successfully used Feeds for importing flat content (no nesting) into Drupal 8 websites I'm a little weary about the multilingual nested Paragraphs. Also, the content is not yet final and the client wants to be able to update it in Google Sheets.


A few months before, I spent quite a bit of time learning about Drupal's Migration API by going through the excellent series 31 Days of Drupal Migrations written by Mauricio Dinarte. This series gave me the confidence I needed to get started with a simple Paragraphs migration and work my way into Migration API deep dive.

To be continued…