"Undefined array key 'migration'" during comment processing / "Failed to connect to your database server"

Created on 18 May 2021, over 3 years ago
Updated 30 September 2023, 12 months ago

Problem/Motivation

"Failed to connect to your database server"

Steps to reproduce

Create migration group using UI. After final step, classic Drupal database connection error alert:

"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?"

Log:

Warning: Undefined array key "migration" in Drupal\migrate\Plugin\Migration->findMigrationDependencies() (line 641 of /usr/local/www/apache24/data/newcognosce/web/core/modules/migrate/src/Plugin/Migration.php)
#0 /usr/local/www/apache24/data/newcognosce/web/core/includes/bootstrap.inc(305): _drupal_error_handler_real(2, 'Undefined array...', '/usr/local/www/...', 641)
#1 /usr/local/www/apache24/data/newcognosce/web/core/modules/migrate/src/Plugin/Migration.php(641): _drupal_error_handler(2, 'Undefined array...', '/usr/local/www/...', 641)
#2 /usr/local/www/apache24/data/newcognosce/web/core/modules/migrate/src/Plugin/Migration.php(614): Drupal\migrate\Plugin\Migration->findMigrationDependencies(Array)
#3 /usr/local/www/apache24/data/newcognosce/web/modules/wordpress_migrate/src/WordPressMigrationGenerator.php(327): Drupal\migrate\Plugin\Migration->getMigrationDependencies()
#4 /usr/local/www/apache24/data/newcognosce/web/modules/wordpress_migrate/src/WordPressMigrationGenerator.php(252): Drupal\wordpress_migrate\WordPressMigrationGenerator::createEntityFromPlugin('wordpress_comme...', 'my_wordpress_co...')
#5 /usr/local/www/apache24/data/newcognosce/web/modules/wordpress_migrate/src/WordPressMigrationGenerator.php(176): Drupal\wordpress_migrate\WordPressMigrationGenerator->createContentMigration('post')

In fact, database is running and site is otherwise behaving normally.

Something looks awry in the handoff from getMigrationDependencies to findMigrationDependencies during processing of comments.

Update: see 🐛 Undefined array key "migration" in findMigrationDependencies() Active
💬 Support request
Status

Fixed

Version

3.0

Component

Miscellaneous

Created by

🇺🇸United States robballan

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024