Closed (duplicate)
Project:
Migrate Extras
Version:
7.x-2.3
Component:
Profile2
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 May 2012 at 01:32 UTC
Updated:
28 Feb 2013 at 13:13 UTC
I am upgrading site from Drupal 6 to Drupal 7 using migrate module. As profile is deprecated in Drupal 7 so I added fields to the user entity. I didn't had any problem migrating all the users but I have been looking around about how can I migrate user profiles and so far didnt find anything. On http://drupal.org/node/835738 - profile migration support was added for Drupal 6 but it wont work in my case as I am adding fields to the user and not using hidden profile module in D7.
Comments
Comment #1
mikeryanYou need to query the profile data from Drupal 6 and add field mappings from that to your Drupal 7 fields. The Drupal 6 profile schema is a bit complicated, but you can do it. Assume that in Drupal 6 you've created two profile fields First Name (which in the profile_fields table has a fid of 1) and Last Name (fid of 2):
Does this help?
Comment #3
kgoel commentedMike - Thanks for quick reply. I am using Profile 2 and Migrate Extras module to migrate user profiles however I am not sure what I am doing wrong as when I run drush mi than no error is thrown but I am getting Processed 0 (0 created, 0 updated, 0 failed, 0 ignored) in 0 sec . I know this is issue queue for migrate and not for migrate extras but thought you might be able to point me in the right direction.
Comment #4
mikeryanThere's not much I can tell you without seeing how you're querying the source data, and mapping it to the profile2 fields.
Comment #5
mikeryanAnswering over in #1598994: Fatal error when trying to migrate profile.
Comment #6
peteruithoven commentedI just discovered profiles are almost automatically migrated when you use the Drupal-to-Drupal data migration module.
http://drupal.org/project/migrate_d2d
You just need to add some field mappings, I needed for example:
You can get all these names from the migrate interface where you can see what's mapped and what's not.
(Great stuff Mike!)
Comment #7
visualfox commentedHello Mike,
In the prepareRow function you should modify the $row variable not the $this (which is the migrate object itself), based on your example:
need to be