My migration is from a legacy D6 database towards the OpenPublish (OP) distribution. OP makes use of profiles for many nodes. I have two questions:
1) Howto populate the Profile Node with User data within migrate_d2d? My node_arguments (as per the migrate_d2d example provided in the source) is as follows:
array(
'class_name' => 'ProfileMigration',
'description' => t('Migration of profile nodes from Drupal 6'),
'machine_name' => 'Profile',
'source_type' => 'User',
'destination_type' => 'profile',
'dependencies' => array('User'),
),
But surely this doesn't work. When I run Drush ms it tells me there are zero nodes waiting to be imported
2) How do I make sure that the nodes who make use of this profile functionality will have the uid set to 1 (admin)? Is this a simple mapping such as:
$this->addFieldMapping('uid')->defaultValue(1);
Or will this create problems with the internal setup of migrate_d2d?
Comments
Comment #1
mixhael commentedThink I've fixed this issue too.
Removed this in the .module:
Added this in the same file:
Then changed the class in node.inc according the following:
Will test this out and give feedback on it's workings...
Comment #2
mixhael commentedsorry, *deleted this*, replied in the wrong thread
Comment #3
mixhael commentedSorry, can only test this properly when the issue here is fixed: http://drupal.org/node/1813672
Comment #4
mikeryanSee #1809484: How to migrate from D6 node to D7 term? for a similar question - the principle would be the same.
Comment #5
mixhael commentedThanks, that works for me