Closed (fixed)
Project:
Migrate
Version:
7.x-2.5
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2013 at 20:27 UTC
Updated:
20 May 2013 at 20:50 UTC
I have an event content type in d6 with 4 fields that are stored in the content_type_event table, field_event_datetime, field_event_location, field_event_contact, field_phone_email. I have tried to migrate them directly in the Event migration class, i.e.
$this->addFieldMapping('field_event_contact', 'field_event_contact_value');
I have also tried using prepareRow($current_row) to put the data in source fields and then using the source fields to map the data. I have tried treating the data as array elements in the prepareRow(). Nothing seems to work. The field records are created in the db, but the value is empty.
What must I do to pull data out of the content_type_X record for mapping to D7 fields?
Comments
Comment #1
mikeryanAre you using migrate_d2d at this point? If so, this issue should be in that queue, and you would just use "field_event_contact" as the source field name (it automatically understands that the primary value for the field is in the field_event_contact_value column in the database).
If you're doing it yourself, then yes, in prepareRow() you need to read the content_type_event table and populate $row from there. I can't tell from your description what might be going wrong - it would be helpful to post the prepareRow() code.
Comment #2
rsbecker commentedMike
It finally worked after I realized the need to apply the subfields and registration patches to date.migration.inc.
That revealed a couple of more fixes to date.migrate. I've already posted one of them. The second is to fix an error when the date field doesn't have a to field.
Comment #3
mikeryan