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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richgerdes created an issue. See original summary.

richgerdes’s picture

Status: Active » Needs review
FileSize
1.22 KB

See Attached patch.

DamienMcKenna’s picture

Oh, good catch, thank you. Let's see what the tests say.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed, with an addition to the comment. Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.