Skip to content
Snippets Groups Projects
Commit 953749da authored by danielspeicher's avatar danielspeicher
Browse files

Remove patches for entity_import amos/allianzapps/sites/grp#10161

parent e3126016
No related branches found
No related tags found
1 merge request!300Merging develop into main
Pipeline #1308604 failed
......@@ -103,14 +103,9 @@
},
"drupal/entity_import": {
"#3061935 Make it work without content_translation": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3061935.diff",
"#3293638 Fixes for latest version of migrate module": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3293638.diff",
"#3327582 Delimiter and file extension": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327582.diff",
"#3313236 Fix config schema": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3313236.diff",
"#3313929 Fix usage of config schema": "https://www.drupal.org/files/issues/2022-10-06/entity_import-3313929.patch",
"#3309559 Remove basic_html": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3309559.diff",
"#3327593 Operators for lookup": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327593.diff",
"#3327614 Display file errors": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327614.diff",
"#3362942 Deprecation of optional argument": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3362942.diff"
"#3327593 Operators for lookup": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327593.diff"
},
"drupal/entity_share": {
"#3306745 File Share overrides the name of media entity": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3306745.diff",
......
......@@ -103,14 +103,9 @@
},
"drupal/entity_import": {
"#3061935 Make it work without content_translation": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3061935.diff",
"#3293638 Fixes for latest version of migrate module": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3293638.diff",
"#3327582 Delimiter and file extension": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327582.diff",
"#3313236 Fix config schema": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3313236.diff",
"#3313929 Fix usage of config schema": "https://www.drupal.org/files/issues/2022-10-06/entity_import-3313929.patch",
"#3309559 Remove basic_html": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3309559.diff",
"#3327593 Operators for lookup": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327593.diff",
"#3327614 Display file errors": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327614.diff",
"#3362942 Deprecation of optional argument": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3362942.diff"
"#3327593 Operators for lookup": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327593.diff"
},
"drupal/entity_share": {
"#3306745 File Share overrides the name of media entity": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3306745.diff",
......
diff --git a/modules/entity_import_plus/src/EventSubscriber/EntityImportPlusEventSubscriber.php b/modules/entity_import_plus/src/EventSubscriber/EntityImportPlusEventSubscriber.php
index 90622ef6bff0f26dc608dbed424ebed208deb84a..e6154ceaf37e43292ec9f8535b592a01d1adaf7a 100644
--- a/modules/entity_import_plus/src/EventSubscriber/EntityImportPlusEventSubscriber.php
+++ b/modules/entity_import_plus/src/EventSubscriber/EntityImportPlusEventSubscriber.php
@@ -34,5 +34,11 @@ class EntityImportPlusEventSubscriber implements EventSubscriberInterface {
'plugin' => 'entity:node'
]);
}
+ // The str_replace plugin throws an exception if initialized with invalid
+ // configuration.
+ if ($event->getPluginId() === 'entity_import_plus_str_replace') {
+ $event->setConfigurationValue('search', []);
+ $event->setConfigurationValue('replace', []);
+ }
}
}
diff --git a/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityGenerate.php b/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityGenerate.php
index f62832269fe170c7bc03d3ad4a6675401ba29393..1fde39ea907e4196256185e72054cde82c2791c9 100644
--- a/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityGenerate.php
+++ b/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityGenerate.php
@@ -32,16 +32,6 @@ class EntityImportPlusEntityGenerate extends EntityGenerate implements EntityImp
use EntityImportProcessTrait;
- /**
- * @var \Drupal\Core\Entity\EntityTypeManagerInterface
- */
- protected $entityTypeManager;
-
- /**
- * @var \Drupal\Core\Entity\EntityFieldManagerInterface
- */
- protected $entityFieldManager;
-
/**
* @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
@@ -79,7 +69,7 @@ class EntityImportPlusEntityGenerate extends EntityGenerate implements EntityImp
$pluginId,
$pluginDefinition,
MigrationInterface $migration = NULL
- ) {
+ ): self {
return new static(
$configuration,
$pluginId,
diff --git a/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityLookup.php b/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityLookup.php
index 2ccf563350fa324d76f025804893b695416fc849..73b54c54c545ad0dc0c8dc49f09f93b6f2c90e64 100644
--- a/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityLookup.php
+++ b/modules/entity_import_plus/src/Plugin/migrate/process/EntityImportPlusEntityLookup.php
@@ -30,16 +30,6 @@ class EntityImportPlusEntityLookup extends EntityLookup implements EntityImportP
use EntityImportProcessTrait;
- /**
- * @var \Drupal\Core\Entity\EntityTypeManagerInterface
- */
- protected $entityTypeManager;
-
- /**
- * @var \Drupal\Core\Entity\EntityFieldManagerInterface
- */
- protected $entityFieldManager;
-
/**
* @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface
*/
diff --git a/src/EntityImportProcessManager.php b/src/EntityImportProcessManager.php
index 69ecf4ef779570993f8336d14d86cace0e78eb08..3afb7e9da23e849a6eaf48e26d844624541faa8a 100644
--- a/src/EntityImportProcessManager.php
+++ b/src/EntityImportProcessManager.php
@@ -59,10 +59,11 @@ class EntityImportProcessManager implements EntityImportProcessManagerInterface
EntityImportEvents::ENTITY_IMPORT_PREPARE_MIGRATION_STUB,
new EntityImportMigrationStubEvent($plugin_id, [])
);
+ $configuration += $prepare_event->getConfiguration();
$migration = isset($migration)
? $migration
- : $this->migrationManager->createStubMigration($prepare_event->getConfiguration());
+ : $this->migrationManager->createStubMigration($configuration);
return $this
->migratePluginManager
diff --git a/src/Form/EntityImporterPageImportForm.php b/src/Form/EntityImporterPageImportForm.php
index 7affbcb8792770c19d0a5175fc5c8a2b41960c94..c8d430e08bd08b4a2bbecb3d5dfbba10ac8832e7 100644
--- a/src/Form/EntityImporterPageImportForm.php
+++ b/src/Form/EntityImporterPageImportForm.php
@@ -284,7 +284,6 @@ class EntityImporterPageImportForm extends EntityImporterBundleFormBase {
$form[$migration_key]['#description'] = [
'#type' => 'processed_text',
'#text' => $description,
- '#format' => 'basic_html',
];
}
diff --git a/config/schema/entity_import.schema.yml b/config/schema/entity_import.schema.yml
index 8732785642ab5de649ef21468295d1fa0c5f824d..865fddd655dc5228c4f4f9d42bfaaa5ecc57b813 100644
--- a/config/schema/entity_import.schema.yml
+++ b/config/schema/entity_import.schema.yml
@@ -50,7 +50,7 @@ entity_import.type.*:
label: 'Entity importer entity info'
mapping:
type:
- type: text
+ type: string
label: 'Entity importer entity type'
bundles:
type: sequence
diff --git a/src/Plugin/migrate/source/EntityImportSourceCSV.php b/src/Plugin/migrate/source/EntityImportSourceCSV.php
index 5430bd64c798e1c737f9d781883b1c5acae299d7..7673fa53fa62dfafe49232c99ec1117665a28807 100644
--- a/src/Plugin/migrate/source/EntityImportSourceCSV.php
+++ b/src/Plugin/migrate/source/EntityImportSourceCSV.php
@@ -11,6 +11,7 @@ use Drupal\migrate\Annotation\MigrateSource;
use Drupal\migrate\Exception\RequirementsException;
use Drupal\migrate\Plugin\RequirementsInterface;
use Drupal\migrate\Row;
+use League\Csv\Exception;
use League\Csv\Reader;
/**
@@ -114,7 +115,13 @@ class EntityImportSourceCSV extends EntityImportSourceLimitIteratorBase implemen
$complete = $form_state->getCompleteForm();
$element = NestedArray::getValue($complete, $parents);
- $headers = $this->buildFileIterator()->current();
+ try {
+ $headers = $this->buildFileIterator()->current();
+ }
+ catch (Exception $e) {
+ $form_state->setError($element['file_id'], $e->getMessage());
+ return;
+ }
if ($missing = $this->getEntityImporter()->getMissingUniqueIdentifiers($headers)) {
$form_state->setError(
diff --git a/src/Plugin/migrate/process/EntityImportMigrationLookup.php b/src/Plugin/migrate/process/EntityImportMigrationLookup.php
index 61a3486744b9dfe11b8afeca3ebf92353292b534..be780f3cd75bbff466e90e68c1e4ac48752ccf56 100644
--- a/src/Plugin/migrate/process/EntityImportMigrationLookup.php
+++ b/src/Plugin/migrate/process/EntityImportMigrationLookup.php
@@ -37,7 +37,7 @@ class EntityImportMigrationLookup extends MigrationLookup implements EntityImpor
$plugin_id, $plugin_definition,
MigrationInterface $migration,
$migrate_lookup,
- $migrate_stub = NULL,
+ $migrate_stub,
MigrationPluginManagerInterface $migrate_plugin_manager
) {
parent::__construct($configuration,
......@@ -99,14 +99,9 @@
},
"drupal/entity_import": {
"#3061935 Make it work without content_translation": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3061935.diff",
"#3293638 Fixes for latest version of migrate module": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3293638.diff",
"#3327582 Delimiter and file extension": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327582.diff",
"#3313236 Fix config schema": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3313236.diff",
"#3313929 Fix usage of config schema": "https://www.drupal.org/files/issues/2022-10-06/entity_import-3313929.patch",
"#3309559 Remove basic_html": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3309559.diff",
"#3327593 Operators for lookup": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327593.diff",
"#3327614 Display file errors": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327614.diff",
"#3362942 Deprecation of optional argument": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3362942.diff"
"#3327593 Operators for lookup": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3327593.diff"
},
"drupal/entity_share": {
"#3306745 File Share overrides the name of media entity": "https://gitlab.lakedrops.com/composer/plugin/drupal-environment/-/raw/main/patches/d10/3306745.diff",
......
......@@ -108,15 +108,10 @@
},
"drupal/entity_import": {
"#3061935 Make it work without content_translation": "https://git.drupalcode.org/project/entity_import/-/merge_requests/2.diff",
"#3293638 Fixes for latest version of migrate module": "https://git.drupalcode.org/project/entity_import/-/merge_requests/3.diff",
"#3327582 Delimiter and file extension": "https://git.drupalcode.org/project/entity_import/-/merge_requests/6.diff",
"#3287246 Deprecations": "https://www.drupal.org/files/issues/2022-07-22/entity_import.1.x-dev.rector.patch",
"#3313236 Fix config schema": "https://git.drupalcode.org/project/entity_import/-/merge_requests/5.diff",
"#3313929 Fix usage of config schema": "https://www.drupal.org/files/issues/2022-10-06/entity_import-3313929.patch",
"#3309559 Remove basic_html": "https://git.drupalcode.org/project/entity_import/-/merge_requests/4.diff",
"#3327593 Operators for lookup": "https://git.drupalcode.org/project/entity_import/-/merge_requests/7.diff",
"#3327614 Display file errors": "https://git.drupalcode.org/project/entity_import/-/merge_requests/8.diff",
"#3362942 Deprecation of optional argument": "https://git.drupalcode.org/project/entity_import/-/merge_requests/9.diff"
"#3327593 Operators for lookup": "https://git.drupalcode.org/project/entity_import/-/merge_requests/7.diff"
},
"drupal/entity_share": {
"#3306745 File Share overrides the name of media entity": "https://git.drupalcode.org/project/entity_share/-/merge_requests/55.diff",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment