I set up a fresh Drupal 8.1.x-dev site, and enabled migrate, migrate_drupal, and migrate_drupal_ui modules. I then ran a migration from a Drupal 7 install, which failed (probably due to timeout, but that's a different issue). I then went back to the upgrade form and selected Rerun. I got this error.

The website encountered an unexpected error. Please try again later.

I see this error in error log:

AH01071: Got error 'PHP message: Recoverable fatal error: Argument 1 passed to Drupal\\migrate_drupal_ui\\Form\\MigrateUpgradeForm::getConnection() must be of the type array, null given, called in /var/www/bbd8/web/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php on line 950 and defined in /var/www/bbd8/web/core/modules/migrate_drupal/src/MigrationCreationTrait.php on line 32\n', referer: http://zensrv.dev/bbd8/web/upgrade

I think this is a regression since beta1 as this used to work initially when I tried it on beta1 (but there were other problems).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hussainweb created an issue. See original summary.

hussainweb’s picture

Status: Active » Needs review
FileSize
641 bytes

I am not sure if this patch is the ideal way to fix things but it works and it helped me at least move to the next step.

The idea way would be to figure out why the state key is not being saved in the migrate source plugins itself. This used to happen in MigrationCreationTrait before #2625696: Make migrations themselves plugins instead of config entities and I can't find an equivalent block of code at all anymore. I will try that if possible and update the patch but since we are setting a fallback, maybe this block of code is useful anyway.

alexpott’s picture