Problem/Motivation
I'm attempting to import a Wordpress-6.0.2 WXR file into a brand new Drupal-9.4.7 installation. I run through the steps in the UI, and on the final page where the import should happen, it fails with the error:
Failed to connect to your database server. The server reports the following message: No database connection configured for source plugin variable.
I'm very confused what this error means, as everything else in this Drupal installation is working fine, and my database connection information is already correct in sites/default/settings.php .
If I go back into the Migrations UI and manually execute each of the steps, they complete successfully. Yet, if I blow away everything that was imported, and start over again, it fails all over again with the same data connection error.
Comments
Comment #2
hongpong commentedIt may have to do with the site settings oddly enough. see
#3214639: "Undefined array key 'migration'" during comment processing / "Failed to connect to your database server"
Comment #3
hongpong commentedThis kind of thing is still popping up periodically. One of the migrate modules tends to print these a little often. one of the yml files may be triggering this but it is not obvious which one.
Comment #4
dinarcon commentedI think this error is coming from \Drupal\migrate\Plugin\migrate\source\SqlBase::setUpDatabase. There is a test case in
\Drupal\Tests\migrate_drupal\Unit\source\DrupalSqlBaseTest::testSourceDatabaseErrorif people want to research further.I do not think the error is related to
wordpress_migrate. See related core issue.Comment #5
hongpong commentedIf people see this please re open or refer to #3221087: Suppress error about missing requirements for migrating variables when using Drupal 8+ as a source .. collect the config entities for further documentation.