Created
July 18, 2024 20:09
-
-
Save junaidpv/d18b6330b37f102ea3ea97e0f10845c7 to your computer and use it in GitHub Desktop.
This patch contains fixes specified devised for BWMA migraiton from D7 to D9. This can be removed once the migraiton is over.
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
--- a/core/modules/field/src/Plugin/migrate/field/d7/EntityReference.php | |
+++ b/core/modules/field/src/Plugin/migrate/field/d7/EntityReference.php | |
@@ -32,4 +32,15 @@ | |
]; | |
} | |
+ /** | |
+ * {@inheritdoc} | |
+ */ | |
+ public function getFieldWidgetMap() { | |
+ $map = parent::getFieldWidgetMap() + [ | |
+ 'inline_entity_form_single' => 'inline_entity_form_simple', | |
+ 'inline_entity_form' => 'inline_entity_form_complex', | |
+ ]; | |
+ return $map; | |
+ } | |
+ | |
} | |
--- a/core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceSettings.php | |
+++ b/core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceSettings.php | |
@@ -126,6 +126,18 @@ | |
'uuid' => '', | |
]; | |
break; | |
+ case 'media_generic': | |
+ $settings = $instance_settings; | |
+ if (isset($instance_settings['default_image']) && $instance_settings['default_image'] === 0) { | |
+ $settings['default_image'] = [ | |
+ 'alt' => '', | |
+ 'title' => '', | |
+ 'width' => NULL, | |
+ 'height' => NULL, | |
+ 'uuid' => '', | |
+ ]; | |
+ } | |
+ break; | |
default: | |
$settings = $instance_settings; | |
--- 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 @@ | |
case 'user_reference': | |
$value['target_type'] = 'user'; | |
break; | |
+ case 'entityreference': | |
+ if ($value['target_type'] == 'profile2') { | |
+ $value['target_type'] = 'profile'; | |
+ } | |
default: | |
break; | |
--- a/core/modules/file/src/Plugin/migrate/field/d6/FileField.php | |
+++ b/core/modules/file/src/Plugin/migrate/field/d6/FileField.php | |
@@ -38,6 +38,7 @@ | |
'image_plain' => 'image', | |
'image_nodelink' => 'image', | |
'image_imagelink' => 'image', | |
+ 'file_download_link' => 'generic_media_link', | |
]; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment