0

I need to import certain nodes from a Drupal 6 site to a Drupal 7 one. I have a particular situation:

  • I need to import only nodes of a certain type

  • Node types have different names in the sites ("Question&Answer" in the drupal 6 site, "Answers" in the drupal 7 one)

  • The 2 types have the same fields, but some fields have different names (The drupal 7 nodes have additional fields, but they are not required)

  • I need to put the id of the drupal 6 nodes in a field called "orig_id", the drupal 7 nodes need to have different IDs

  • Nodes have 4 taxonomy relations: 2 use Hierarchical select, 1 (tags) can have new terms added when creating a new content (and the 2 sites have a different set of tags at the moment). Taxonomy vocabularies have different names, but (except for tags) contain the same terms.

  • Node Authors are the same in both sites, but they have different IDs. Importing authors references is not a must, so it can be skipped

I am fairly new to Drupal, i have tried searching for some import modules and/or articles about importing, but i can't find a guide that suits all my needs.

4
  • There is a Migrate module for that, however, it's fairly advanced and probably not easy to grasp for someone new to Drupal. Also, you'll still need some programming skills to write your custom migration script. You can also write a bootstrapped PHP script without using Migrate, if it's just a one time only import. You would need to know how to extract data from your D6 db and import that data using node_prepare/node_save functions.
    – Paul
    Jul 17, 2014 at 12:35
  • Even though i'd rather a simplier solution, I have no problem at "getting my hands dirty", is there any guide i can follow?
    – valepu
    Jul 17, 2014 at 16:59
  • If you want to use the Migrate module, you can read through and follow drupal.org/node/1006982 . The module contains an example migrate script for importing beer brands into Drupal. You can use that script as a starting point to create your own custom migrate script.
    – Paul
    Jul 20, 2014 at 16:28
  • in the end i have made a custom bootstrapped script, thanks
    – valepu
    Jul 20, 2014 at 17:17

1 Answer 1

0

I have solved by checking which fields i needed, i made a table with those fields then made a custom boostrappable script to import them as new nodes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.