Entityreference subfields for Migrate

After the #1676646: make migrate field handler behave the same way as term reference: accept entity labels, allow creation of entities patch will be committed, there'll be available three new sub-fields for Entityreference field:

  • source_type: If the option is set to 'name', there would be used text label of an entity, rather than its ID in the source column.
  • create_entity: If the option is set to TRUE (or any other value different from FALSE/0), and the source_type is set to 'name', then if no entity was found for the given label, it will be created automatically.
  • ignore_case: If this option is TRUE, then case differences (uppercase vs. lowercase) between source data and existing entity names will be ignored. The default behavior is to not ignore case.

How to create nodes with hierarchical terms from excel

The purpose of this cookbook is to show how to create node from a excel documents via csv files.
The example we use is a list of stores with name, adress and three column to convert to terms a state,capital ubication and a kind of store column.

Create migrate module

First thing we are going to do is make a tipically module named migratestores.

migratestores.info

Migration of Image Attach module

image attach is part of image module and creates a unique node for each image in your content type. Although best solution for creating images on Drupal 6 is using CCK file and image fields but many sites chose the other approach. Here comes the problem, migrate_d2d understands CCK structure but not other solutions and you need to write a custom class for this reason.

A bird's eye view of migrate structure

Migrate Classes

  • Migration [base]
  • MigrateSource
  • MigrateDestination
  • MigrateMap
  • MigrateFieldMapping

Source Classes

  • MigrateSourceSQL
  • MigrateSourceList
  • MigrateSourceMultiitems
  • MigrateSourceXML
  • MigrateSourceCSV
  • MigrateSourceMSSQL
  • MigrateSourceOracle
  • MigrateSourceMongoDB
  • MigrateListJSON and MigrateItemJSON
  • MigrateListFile and MigrateItemFile

Destination Classes

  • MigrateDestinationRole

Avoid wrong email adresses and log these to dblog

This Cookbook shows, how you can avoid to import a user in case of errors in the e-mail address and then to add a notice in the drupal error-log (dblog). It adds this behavior to the module A Wusel Migration (http://drupal.org/node/1285276).

Example: Export content Authors (by usernames) as a CSV file

Step-by-step instructions on how to use Views Data Export (version 6.x-2.0-beta6) to export users into a CSV file. This can help you migrate those user accounts which have a specific role from a Drupal 6 site into a site running a newer version of Drupal. Note: this doesn't work with the Core authenticated role.

Pages

Subscribe with RSS Subscribe to RSS - migrate