Migrate Source UI Settings can't be empty so add default config

Created on 14 March 2025, 21 days ago

Problem/Motivation

Was testing this recipe and noticed that when I tried the node.csv at:

/admin/content/migrate_source_ui

I got this error because I hadn't filled in the temp dir at /admin/config/content/migrate_source_ui:

Error message
The file could not be uploaded because the destination "" is invalid.
The file could not be uploaded.

which I assume is already reported (though maybe it's not).

When I put temporary://, it was fine.

Steps to reproduce

Proposed resolution

We could pre-fill the value it with:

temporary://

Remaining tasks

Add config, test, and commit

User interface changes

No errors and config is pre-filled :)

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

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

Comments & Activities

  • Issue created by @Kristen Pol
  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Also get this error before adding a csv file if the temp dir is not specified:

    Failed to connect to your database server. The server reports the following message: No database connection configured for source plugin variable.
    Is the database server running?
    Does the database exist, and have you entered the correct database name?
    Have you entered the correct username and password?
    Have you entered the correct database hostname?
    
  • πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

    @kristen pol:

    Thanks for trying out this recipe.

    I cannot reproduce the problem. This is what I tried:

    1. Install Drupal from the current 11.x.
    2. Install Drush and this recipe: composer require drush/drush drupal/import_csv.
    3. Install Drupal with the standard profile: drush si.
    4. Apply the recipe: drush recipe recipes/import_csv.
    5. Log in.
    6. Visit /admin/content/migrate_source_ui.
    7. Select "Nodes (supports csv) from the select list (the default) and upload recipes/import_csv/examples/nodes.csv as the source.
    8. Submit the form ("Migrate").

    I did not get any errors, and the migration created three nodes.

    On /admin/config/content/migrate_source_ui, I see the message,

    The module will use Drupal's default temporary:// stream if this is not set.

    My test seems to confirm that. At least, the module works without that being set.

    Are you getting the current versions of the migration modules? If not, that might explain why you are getting different results.

    Failed to connect to your database server.

    That message comes from the migrate_drupal module. See πŸ“Œ Improve error reporting from migrate_drupal_migration_plugins_alter() Needs work . Can you uninstall migrate_drupal or supply database credentials for it? I do not think there is anything this recipe, or the modules it installs, can do to work around this core bug.

Production build 0.71.5 2024