I experienced a bug when importing content with Wordpress Migrate.

If you don't have a body field enabled in Drupal you get an error like this when migrating attachments:

Undefined property: stdClass::$body File /.../sites/all/modules/contrib/wordpress_migrate/wordpress_attachment.inc, line 246 (file: /.../sites/all/modules/contrib/wordpress_migrate/wordpress_attachment.inc, line 246)

There is no check if $node->body exists.

Comments

alesr’s picture

Issue summary: View changes

minor changes

alesr’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
StatusFileSize
new624 bytes

Fix in attached patch.

Sponsored with coffee by paranojik ;)

alesr’s picture

Status: Active » Needs review
mikeryan’s picture

Status: Needs review » Closed (duplicate)

I think #1532648: Override the body mapping will be a better solution - if you have some field not named 'body' where you would like the blog content to go, you can use that. If you really want to drop the WordPress post bodies on the table, then leaving the body unmapped should be an option.

mikeryan’s picture

Issue summary: View changes

minor changes