I’m in the process of migrating a fairly large old site that has been migrated from Drupal 6 to Drupal 7, and now to Drupal 8.
There are a few issues about getting this done, but I have a grip on most of it. (I’m tossing a lot of functionality; 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 Drupal 7 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 Drupal 8 site never seems to touch the Drupal 7 website, and just fails on every file with an error message similar to the following one.
‘/sites/default/files/images/151659850_3902971153115469_2314013813948011350_o.png’ does not exist
The other website never gets hit. I’ve also tried changing the configuration 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 doesn’t 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: { }
How can I resolve this issue?
Go to Source of this post
Author Of this post: Steve Hanson
Title Of post: Problems with file migration
Author Link: {authorlink}