Advice on content migration

Hello everyone,

We have made quit some progress with our website and are now thinking about doing some content migration test.

Do you know any module to map the fields of a content type from Drupal 7 to Drupal 8 ?

Also, we have tags in the body of our articles on our current Drupal 7 website allowing us to position content. They use the syntax [ nameOfTheTag ] , we would like to exclude them from the migration. Is there a way to do so ?

Thank you very much,

Maxime

Hi Max,

Personally I prefer to use feeds for content migration. You can create a json feed with all the data that you want from your website in Drupal 7 and then import the data from that feed in Drupal 8.

In Drupal 8 you will need the following modules:
Feeds;
Feeds extensible parsers;
Ludwig.

For the feeds extensible parsers follow the module’s instructions in order to install the necessary library and detect it using Ludwig module. You have to use the extensible parser’s dev version.

Once you have everything set, create a new feed in your Drupal 8 website Structure->Feed types using Jsonpath and map it to a content type. Then you can start mapping fields from the feed to your content type.

Finally you go to Content->Feeds and you create a new feed. You put the URL of your JSON feed and then click on import.

Let me know if you need any more help with that.

Hi Sotirios,

Great thank you very much, i’ll try this out.

Max

Hey @sboutas,

Quick question, you told me last time that i could expose a json feed from Drupal 7 so i could consume it from Drupal 8 and create my nodes. I did a bit a research but didn’t find anything really relevant to expose json from Drupal. Is there some module i could use ?

Thank you :slight_smile:

Maxime

Hello,

I am also interested in the topic. Could you provide us with more specific information on how we can generate this url in D7?

Kind regards,
Ioannis

Hi @ibatas ,

Here are some steps to follow on D7 :

  1. Download and install the Views Datasource module. It allows you to expose JSON from a view. This module is composed of different output format. Once you install the module, activate the submodule named View JSON

  2. Go to Structure > Views

  3. Create a new view with the following settings :

  • Show : Content
  • Type : The kind of content type you want to expose
  • Create a page
  • Path : by default the title of your view, note that this URL is the one of your ressource and you’ll need to get the get from Drupal 8
  • Display format : JSON data document
  • Items to display : here pick the number of item you want to expose
  • User a pager : Uncheck this field
  1. Edit your view to add the field you would like to expose

You’re all set, if you check the URL with a browser or CURL, you should get the output directly in JSON.

Let me know if it’s not clear. I’m not a pro but it seems to work for me :slight_smile:

Max

2 Likes