I've tested this module with a WordPress XML file. Title, tags and categories imported fine. However, I have a custom field set for my body field in Drupal. (In other words, I deleted the original body field and created my own in my custom Blog content type as I did not want a summary field.)

I saw in this comment that custom fields are not yet implemented. Is that still the case?

The warnings I got (on /admin/content/migrate/headermottoxpngBlogEntry )

"body" was used as destination field in "content" mapping but is not in list of destination fields
"pathauto" was used as destination field in "" mapping but is not in list of destination fields

... and indeed my custom body field showed up in red down below in that page.

I get the impression, one could write a module to achieve this but I don't have those skills, even after watching some of the screencasts and tutorials for Migrate. I thought it was pretty cool on /admin/content/wordpress/configure that I could choose the mapping of tags and categories, it would be nice to be able to map the body as well. Thanks.

Comments

mikeryan’s picture

Title: Mapping custom fields? » Override the body mapping
Component: Miscellaneous » User interface
Category: support » feature

The "custom fields" that other issue refers to are custom fields from WordPress, not custom Drupal fields.

We can do this. Not the #1 priority though...

danny englander’s picture

Hi I decided to simply put the default body field back for now, that will suffice so I think this is probably a moot point. I've actually got another issue that I need to file that's probably more important in regard to image import but I need to search the queue first to see if my problem occurred for someone else already. Thanks!

mikeryan’s picture

thalism’s picture

I had the same situation here.

I found out that I could just change the field destination name in the code. I know it isn't the right way, but it works well, if you have no time.
So, if you change the 176º line of the wordpress_item.inc file from this

$this->addFieldMapping('body', 'content')

to this

$this->addFieldMapping('myfieldname', 'content')

it works very well.
i just have to find a solution to import the blog images, but... this is another issue.

mikeryan’s picture

Status: Active » Closed (works as designed)

With Migrate 2.6, there's a field mapping editor so you'll be able to override any mapping.

giuvax’s picture

Issue summary: View changes

I can't find the field mapping editor. Where do I have to look?
Thanks

giuvax’s picture

Found it. I didn't look in any single task created. I need to edit the fields there.