diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 7d98a83b752084616cc2b5f19ddb9823bf82309c..6ece00eafb51a659a77619850a7ba4bbe33bf570 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ Next release ============ Features and enhancements +- #1403222 - Relaxed setting of bundle for node destinations. - #1364326 - Default --limit option to items. - #1337640 - Properly optimize the SQL source query for highwater marks. - #1366588 - Source plugin support has been refactored to put more of the common diff --git a/plugins/destinations/node.inc b/plugins/destinations/node.inc index f7fbcb0274dcef983ec092990268d2125190c1b1..77f0b6b087ce339df2e097b8263be495f64423ea 100644 --- a/plugins/destinations/node.inc +++ b/plugins/destinations/node.inc @@ -151,10 +151,14 @@ class MigrateDestinationNode extends MigrateDestinationEntity { $node->uid = $old_node->uid; } } + else if (!isset($node->type)) { + // Default the type to our designated destination bundle (by doing this + // conditionally, we permit some flexibility in terms of implementing + // migrations which can affect more than one type). + $node->type = $this->bundle; + } // Set some required properties. - // Set type before invoking prepare handlers - they may take type-dependent actions. - $node->type = $this->bundle; if ($migration->getSystemOfRecord() == Migration::SOURCE) { if (!isset($node->language)) {