/admin/content/migrate_source_ui leads to /core/install.php

Created on 17 November 2023, about 1 year ago

Problem/Motivation

I installed the module, but I can not access /admin/content/migrate_source_ui - I'm directly redirected to /core/install.php

- Drupal 9.5.11

Steps to reproduce

* Install the Plugin
* Try to access /admin/content/migrate_source_ui

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Schoenef Unna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • 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.

Production build 0.71.5 2024