diff --git a/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php index 3fba70a..c24047b 100644 --- a/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php +++ b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php @@ -4,6 +4,7 @@ use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Component\Plugin\Exception\PluginNotFoundException; +use Drupal\Core\Database\ConnectionNotDefinedException; use Drupal\Core\Database\DatabaseExceptionWrapper; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; use Drupal\migrate\Exception\RequirementsException; @@ -151,6 +152,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { // MigrationPluginManager gathers up the migration definitions but we do // not actually have a Drupal 6 source database. } + catch (ConnectionNotDefinedException $e) { + // It's also possible that the source database is not defined. This can + // happen if a source migration is unused or only used as a base. + } return $this->derivatives; } diff --git a/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php index bd3d8b9..05b47ec 100644 --- a/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php +++ b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php @@ -4,6 +4,7 @@ use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Component\Plugin\Exception\PluginNotFoundException; +use Drupal\Core\Database\ConnectionNotDefinedException; use Drupal\Core\Database\DatabaseExceptionWrapper; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; use Drupal\migrate\Exception\RequirementsException; @@ -121,6 +122,10 @@ public function getDerivativeDefinitions($base_plugin_definition) { // MigrationPluginManager gathers up the migration definitions but we do // not actually have a Drupal 7 source database. } + catch (ConnectionNotDefinedException $e) { + // It's also possible that the source database is not defined. This can + // happen if a source migration is unused or only used as a base. + } return $this->derivatives; }