Problem/Motivation
The Commerce Migrate Commerce 1 migration provides migrations for commerce entity types, which may not be installed on the active site. When runs, it iterates over all the definitions and attempts to load the destination plugin. In the event that the destination entity type doesn't exist, \Drupal::service('plugin.manager.migrate.destination')->getDefinition()
throws an exception and crashes the migration. I think its understandable that the commerce1 migrations exist even if the supported entities don't, and metatag shouldn't assume that they are available.
Steps to reproduce
Install metatag and commerce_migrate_commerce. When you attempt to load the migrations via drush, it should crash.
Proposed resolution
Surround the plugin definition lookup with a try catch to prevent the error from bubbling up to the main thread.
Comment | File | Size | Author |
---|---|---|---|
#2 | 3171660-2-migration-alter-breaks-commerce.patch | 1.22 KB | richgerdes |
|
Comments
Comment #2
richgerdesSee Attached patch.
Comment #3
DamienMcKennaOh, good catch, thank you. Let's see what the tests say.
Comment #5
DamienMcKennaCommitted, with an addition to the comment. Thank you.