Closed (fixed)
Project:
Migrate Extras
Version:
master
Component:
Migrate Extras Features
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
14 Jan 2010 at 05:27 UTC
Updated:
30 Nov 2010 at 16:20 UTC
This patch allows CCK and other data to be injected into $user->'profile|foo' attributes directly in hook_migrate_prepare_user(), and then passed straight into the $node->foo attributes of content_profile nodes on completion.
I've been using this code myself on a site-in-progress for some time. I wrote it before this code was split out into migrate_extras. I've created this patch against the latest code in migrate_extras, however.
As the comments in my patch explain, the patch lets you do something like this in hook_migrate_prepare_user():
$key = 'profile|field_cck_foo';
$user->$foo = $cck_data;
And then content_profile_migrate_complete_user() automatically adds that to the $node object, as:
$node->field_cck_foo;
Very useful! Hope this can make it in.
| Comment | File | Size | Author |
|---|---|---|---|
| migrate_extras_content_profile.patch | 2.5 KB | Jaza |
Comments
Comment #1
frankcarey commentedI actually import content_profiles in their own step, so I'm not very familiar with the content_profile code that we just pulled in from the migrate module. Maybe you can explain this to me a little better? I thought that content_profile integration already exposes all of possible node fields already.
Comment #2
moshe weitzman commentedI am implementing a 2.x migration now and I also do content_profile as its own node migration and it works fine. I recommend removing content_profile integration from 2.x branch. It is not ported anyway.
Comment #3
moshe weitzman commentedI went ahead and removed the content_profile integration from 2.x.