same is the issue here
I’m facing a series of issues during the Drupal 7 commerce migration, specifically related to node-type products and the migration process. Here are the details:
In Drupal 7, the product type is referenced in the content type correctly. However, during the migration D9, the field instance is incorrectly referencing a content type instead of the expected product reference.
When I initiate the migration using the command --execute-dependencies, the process halts with the following error messages
when it reaches upgrade_commerce1_product_variation_product
Undefined array key 0 in ProductVariations.php:70
[warning] Trying to access array offset on the value of type null in ProductVariations.php:70
[error] TypeError: Argument #1 ($currencyCode) must be of type string, null given in CurrencyRepository.php:79
The migration also ignores the upgrade_commerce1_product_attribute This indicates that the “currency code” isn’t being recognized, and skips all other product variations field data.
After some research, I discovered a related issue on Drupal.org (
https://www.drupal.org/project/commerce_migrate/issues/2959614
🐛
Products displays Nodes
Needs work
) and applied the latest patch. However, attempting to run the command
drush migrate-upgrade --legacy-db-key=migrate --legacy-root=http://localhost/drupal7/ --configure-only results in an error about a missing use Drupal\migrate\MigrateException;
.
Adding the missing line
use Drupal\migrate\MigrateException;
in MigratePrepareRow.php seemingly fixed that issue, but a new problem arose when I ran the command
drush migrate-upgrade --legacy-db-key=migrate --legacy-root=http://localhost/drupal7/ --configure-only
[warning] Undefined property: Drupal\commerce_migrate_commerce\EventSubscriber\MigratePrepareRow::$configuration in MigratePrepareRow.php:161
[error] A product variation type could not be determined for the product type: commerce_product_reference
This suggests there’s still an unresolved issue with product variation types during migration.
In the ignored product variation, the commerce_price array only has fraction_digits without amount and currency_code, which are essential for the price field. The successful migration has a complete commerce_price array including amount, currency_code, and data.
and i can see these values in d7 DB the screenshots are attached for the ignored product, but still the migration ignore this