Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Has anyone tried migrating commerce file fields (https://www.drupal.org/project/commerce_file) with multiple source data rows?
I made it worked to some fields except commerce_file fields, it only migrated 1 id where it should have multiple id's.
I've checked the query in the source database, it outputs correctly, my problem is upon migration.
Here's what I did.
$query->addExpression('GROUP_CONCAT(file.field_file_fid)', 'file_id');
.
.
.
.
$this->addFieldMapping('commerce_file', 'file_id')
->sourceMigration('PrivateFile')
->separator(',');
$this->addFieldMapping('commerce_file:file_class')
->defaultValue('MigrateFileFid');
$this->addFieldMapping('commerce_file:preserve_files')
->defaultValue(1);
Thanks for any help!
Comments
Comment #2
mikeryanYou might get more interest in the Commerce File issue queue.