0

Can't understand how migrate node fields from different DB (I mean migration to clear drupal 7 site). At first, I migrate fields by content migrate module but in this case db contain too much garbage. Tried to it by migrate module but didn't find how to do this. Then I used migrate_d2d module, but it doesn't help at all.

Is there way to migrate fields and content without writing by hand each field migration?

0

If by "writing by hand" you mean writing PHP code, then the answer is no. The migration module is a migration framework; it provides the tools (API, PHP classes, etc) to migrate data but it doesn't do it for you. Migrate D2D (built off the Migration framework) provides some support with "out of the box" importing (e.g. User Roles, Pics, Taxonomy, etc.), but it doesn't do it all for you.

The key thing to understand is complexity of the problem; content in Drupal can be configured in a myriad of different ways. As such, one module that can handle all the different permutations of sources (e.g. CSV, WordPress site, various DB's, & an old Drupal install), field configurations (e.g. ints, floats, text, custom objects, custom fields, module create fields), & destinations (e.g. custom node types, module-create node types, custom entities, etc.) is a mammoth task for an open-source project.

Instead, the Migration & Migrate D2D maintainers have made the problem more tractable. They've provided some common tools that are likely to be used in any Drupal migration. Filling in the last bit of details (e.g. should a phone field be mapped to an address field or as a text field) is up to you because only you can possible know that information and how it's used.

  • So could you please help me to understand how to cook migrate d2d? Does it only make query and that all it make? How to save fields value? – FriOne Jul 8 '15 at 3:59
  • The full details are too big for a DA comment, but here's a blog post ( part 1 & part 2 ) that's a good starting point. Essentially, it involves creating a module with classes that extend the ones create in migrate_d2d. Your extended class will implement methods to build your data source, modify any data as you need, and define a constructor to map your fields. – Shawn Conn Jul 8 '15 at 4:16
  • Yeah, I saw these posts but they not tell anything about fields migration. Actually I didn't find any post where described how to use Field handlers. Agree that the answer on my question is too big. – FriOne Jul 8 '15 at 6:23
  • You can checkout the field handlers section of the Migration documentation. Googling should yield some more resource too. If you need further help, try posting a new question that's solely focused on field handlers. – Shawn Conn Jul 8 '15 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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