diff -u b/core/modules/file/migration_templates/d7_file_private.yml b/core/modules/file/migration_templates/d7_file_private.yml --- b/core/modules/file/migration_templates/d7_file_private.yml +++ b/core/modules/file/migration_templates/d7_file_private.yml @@ -6,11 +6,11 @@ plugin: d7_file scheme: private constants: - # source_full_path must be set by the tool configuring this migration. + # source_base_path must be set by the tool configuring this migration. # It represents the fully qualified path relative to which uris in the files # table are specified, and must end with a /. See source_full_path # configuration in this migration's process pipeline as an example. - source_full_path: '' + source_base_path: '' process: # If you are using this file to build a custom migration consider removing # the fid field to allow incremental migrations. @@ -21,7 +21,7 @@ plugin: concat delimiter: / source: - - constants/source_full_path + - constants/source_base_path - filepath uri: plugin: file_copy diff -u b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php --- b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php +++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php @@ -21,14 +21,14 @@ */ protected function setUp() { parent::setUp(); - $this->setSetting('file_private_path', 'sites/default/private'); + $this->setSetting('file_private_path', $this->container->get('site.path') . '/private'); $this->installEntitySchema('file'); $fs = $this->container->get('file_system'); // Ensure that the private files directory exists. - $fs->mkdir('private://', NULL, TRUE); + $fs->mkdir('private://sites/default/private/', NULL, TRUE); // Put test file in the source directory. - file_put_contents('private://Babylon5.txt', str_repeat('*', 3)); + file_put_contents('private://sites/default/private/Babylon5.txt', str_repeat('*', 3)); /** @var \Drupal\migrate\Plugin\Migration $migration */ $migration = $this->getMigration('d7_file_private');