Created
September 12, 2023 11:38
-
-
Save junaidpv/4830a495e9435904967f430972beddad to your computer and use it in GitHub Desktop.
Patch to help migrate entityrefence field referring profile2 entities in D7 to profile entities in D9. This is prepared for BWMA migration from D7 to D9. Most probably needed for any other sites. Thus can be remoced once the BWMA migration is complete.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php b/core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php | |
index a18e4fac99..e35163b284 100644 | |
--- a/core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php | |
+++ b/core/modules/field/src/Plugin/migrate/process/d7/FieldSettings.php | |
@@ -44,6 +44,10 @@ public function transform($value, MigrateExecutableInterface $migrate_executable | |
case 'user_reference': | |
$value['target_type'] = 'user'; | |
break; | |
+ case 'entityreference': | |
+ if ($value['target_type'] == 'profile2') { | |
+ $value['target_type'] = 'profile'; | |
+ } | |
default: | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment