In issue 1056544 "Support custom fields" it seems that custom fields (wp:meta_key and wp:meta_value in wp:postmeta tags) are supported ; please could you explain the way to process these values ? For instance, if I need to create a term from a meta_value, I suppose I need to have a term field for this, but how can I link this field to the corresponding meta_key ?
Thanks in advance !

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

You would need to derive your own migration class from the defaults - I'm afraid I haven't written documentation for this yet, the closest thing is http://drupal.org/node/1616974#comment-6083888.

The field values are set in the row before it's passed to prepareRow(). I.e., if you have a meta_key of 'my_tag', and value of 'my_meta_value', then you'll see in prepareRow that $row->my_tag == 'my_meta_value'. You can use the key in field_mappings:

$this->addFieldMapping('field_tags', 'my_tag');

Is this helpful? If you're not a Drupal developer, I know the answer is going to be "no"...

mikeryan’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)
cfox612’s picture

Category: support » feature
Status: Closed (works as designed) » Needs work

I'm importing a fairly large WP blog into Drupal 7, and the WP blog uses custom field templates. It would be great if in the admin portion you could specify a custom meta_key to bring in that extra info without modifying the module (since as you pointed out many of us are not (yet) developers).

I've been attempting to modify the module to bring in a simple text field with zero success thus far.

mikeryan’s picture

Title: Way to retrieve custom fields » UI for mapping custom fields
Component: Documentation » User interface
Status: Needs work » Active
mikeryan’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
hongpong’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this as too far back to work on... Thanks all.