- Issue created by @Schoenef
- π©πͺGermany Schoenef Unna
/admin/config/content/migrate_source_ui works, I'm double checking if there is some kind of redirect.
- π©πͺGermany Schoenef Unna
Ok, so it is a code issue, possibly related to https://www.drupal.org/project/drupal/issues/2974321 β
- The form is called, but the redirect happens during the buildForm method in this loop:
foreach ($this->definitions as $definition) { $migrationInstance = $this->pluginManagerMigration->createStubMigration($definition); if ($migrationInstance->getSourcePlugin() instanceof CSV || $migrationInstance->getSourcePlugin() instanceof Json || $migrationInstance->getSourcePlugin() instanceof Xml) { $id = $definition['id']; $options[$id] = $this->t('%id (supports %file_type)', [ '%id' => $definition['label'] ?? $id, '%file_type' => $this->getFileExtensionSupported($migrationInstance), ]); } }
- π©πͺGermany Schoenef Unna
The second of our 6 migrations is already bringing it down - the used plugin is `custom_sql_query` - I guess $this->pluginManagerMigration->createStubMigration($definition) is doing something very ressource intentsive under the hood for this.
I propose do delay this call as late as possible.
- π©πͺGermany Schoenef Unna
This patch works for me - a little drawback is, that I had to hardcode the plugin id, but it takes too much time now, to introduce a static getId method to the migrate universe.
- Status changed to Postponed: needs info
about 2 months ago 3:29am 27 December 2024 - πΊπΈUnited States benjifisher Boston area
@schoenef:
Thanks for reporting this issue and for proposing a patch.
A bug report should have reliable "steps to reproduce" (STR). Yours are incomplete: when I install Drupal and this module, I do not see the bug you report. Comment #4 suggests that the bug is related to a particular migration, and perhaps to a custom source plugin. Can you give enough information (in the issue summary STR) so that we can reproduce the bug?
When you propose a solution by attaching a patch or opening a merge request (MR), remember to change the status from Active to Needs Review so that the maintainers and others know to look at it.
... a little drawback is, that I had to hardcode the plugin id ...
I guess you mean this line?
if ( in_array($definition['source']['plugin'] ?? 'none', ['csv', 'json', 'xml'])) {
That is a problem. If
MyCsv
is a source plugin that extends theCSV
plugin, then the original condition$migrationInstance->getSourcePlugin() instanceof CSV
holds, but you have replaced it with a condition that will fail.I am not sure of the correct status: Needs Work because of the problem with the suggested fix or "needs more info" because of the STR. I think the STR problem is more important.