I am performing a D7 to D7 node migration, using the D7/DrupalNode7Migration class. When the source node’s body field is empty, that row will only import the node title, created data and author id. No custom fields will import. The mapping table for that migration will record source and destination ids for that row. drush mmsg shows no errors for that migration. If I add "<p>&nbsp;</p>" to the source node's body field, all fields will import. Adding a prepare row for empty body fields doesn't help.

Here is my node.inc which extends the migrate_d2d node class for D7 nodes.

Here is my person.inc class, which extends the node.inc class for our migration.

My current work-around is to add that html snippet, above, to such source nodes.

Comments

Screenack created an issue. See original summary.

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

I tried this myself and could not reproduce it - emptying the body for a D7 node in my database did not prevent the tags field from populating. There's no obvious smoking gun in either your field mappings or the migrate_d2d node classes. Any possibility you could debug it on your end?

Screenack’s picture

Mike, I greatly appreciate your attention on my report. I was using:

public function prepare($node, stdClass $row) {
  drush_print_r($node);
  drush_print_r($row);
}

To find patterns to my issues. I wish I had captured the results for review now. When I performed a deeper analysis of the migration, I also found instances where only the title and body field imported, despite the source containing populated custom field data — so there are more issues than my initial report. In other words, only 148 records of 192 imported as I expected. The deadline for this project has me focused on completing this site. If there's value, I can add the output result from the above prepare statement if that helps others in debugging MD2D after project completion.