Well, this feels REALLY stupid on my part, but I have not done a d7-d8 migration for a while now and I’m in the process of trying to do one on a fairly large old site that has gone through d6-d7 and now to d8. There are a few issues about getting this done but I have a grip on most of it (I’m tossing a lot of funtionality so in some cases the migrations are failing but that’s mostly okay.) The BIG problem I have is that I cannot for the life of me get the file migrations to work. The D7 site has both public and private files. I shall leave the private files for the time being – I cannot even get the public files to move over. My first stab was at moving them through http so I have set the source to https://wis.community – but the D8 site never seems to touch the d7 website, and just fails on every file saying
‘/sites/default/files/images/151659850_3902971153115469_2314013813948011350_o.png’ does not exist
And the other web server never gets hit. I’ve also tried changing the config by editing the d7_file.yml file and re-importing it but that constantly fails the same way. It appears that no matter HOW I try to set up the file migration it does not work. I’m obviously missing something basic here but I don’t get it.
The migrate_plus.migration.upgrade_d7_file.yml config file looks like this:
uuid: da623100-323b-473f-9a67-5d6776cf586b
langcode: en
status: true
dependencies: { }
id: upgrade_d7_file
class: DrupalmigratePluginMigration
field_plugin_method: null
cck_plugin_method: null
migration_tags:
- 'Drupal 7'
- Content
migration_group: migrate_drupal_7
label: 'Public files'
source:
plugin: d7_file
scheme: public
constants:
source_base_path: 'https://wis.community/'
process:
fid:
-
plugin: get
source: fid
filename:
-
plugin: get
source: filename
source_full_path:
-
plugin: concat
delimiter: /
source:
- constants/source_base_path
- filepath
-
plugin: urlencode
uri:
-
plugin: file_copy
source:
- '@source_full_path'
- uri
filemime:
-
plugin: get
source: filemime
status:
-
plugin: get
source: status
created:
-
plugin: get
source: timestamp
changed:
-
plugin: get
source: timestamp
uid:
-
plugin: get
source: uid
field_metatag:
-
plugin: d7_metatag_entities
source: pseudo_metatag_entities
destination:
plugin: 'entity:file'
migration_dependencies:
required: { }
optional: { }
If someone could shed some light on this it would probably help a lot with my keeping whatever little hair I have left.