1

I'm migrating from Drupal 7 to Drupal 9 and am having an issue with my source files getting found with the upgrade_d7_file migration. My public files directory for my source site is not 'sites/default/files'. It's a multisite instance and it's public file directory is 'sites/example.com/files'. I have exported the configuration generated with migrate-upgrade --configure-only and can change the source_base_path value, then import it and see changes, but 'sites/default/files' gets added to the end of whatever I put into the source_base_path value. I do have my public files system path defined in 'admin/config/media/file-system' of the source site.

Is there a place to set the default path to start with something other than sites/default/files for the source site?

Added edit

I added $conf['file_public_path'] = 'sites/example.com/files'; to my settings.php file, but it was still not used. I then edited the exported migrate_plus.migration.upgrade_d7_file.yml file, but not the source_base_path. I added another constant underneath it "file_public_path: sites/example.com/files" then in the process section edited source_full_path's concat plugin section to

source_full_path:
  -
    plugin: concat
    delimiter: /
    source:
      - constants/source_base_path
      - constants/file_public_path
      - filename
  -

Then reimported the config. This worked, but it seems like a ridiculous workaround.

Thanks

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.