このパッチを参照してください:https : //www.drupal.org/project/drupal/issues/2965938#comment-12587479
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/core/modules/migrate/src/MigrateExecutable.php
+++ b/core/modules/migrate/src/MigrateExecutable.php
@@ -363,8 +363,18 @@
$break = FALSE;
foreach ($value as $scalar_value) {
try {
- $new_value[] = $plugin->transform($scalar_value, $this, $row, $destination);
+// $new_value[] = $plugin->transform($scalar_value, $this, $row, $destination);
+ // reserve salar value
+ $result = $plugin->transform($scalar_value, $this, $row, $destination);
+ // fix parent_id always return null on MigrationLookup::transform
+ if (is_null($result)) {
+ if ($scalar_value) {
+ $new_value[] = $scalar_value;
}
+ } else {
+ $new_value[] = $result;
+ }
+ }
catch (MigrateSkipProcessException $e) {
$new_value[] = NULL;
$break = TRUE;