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.
Why in the latest dev do you urlencode only the basename? This was added in commit 7b76d906 on line 352 in plugins/destinations/file.inc
My migration was working just fine until that commit. I am migrating from a CSV file. I had to make sure that all my URLs were encoded. Now I have to make sure that the path or directory is encoded, but not the basename (or filename).
Why only the filename? Can we change this the encode the entire sourcePath.
Comments
Comment #1
mikeryanEncoding the entire source path would encode the slashes. But, perhaps you want to explode on the slashes and encode each component?
Comment #2
mikeryanComment #3
mikeryanOK, ran into this myself with some directories containing spaces, so I had some real data to test with. It will now urlencode all path components - and while it's at it, only do it for full URIs, not local files, which probably fixes #1800616: Whitespace in file uri is urlencoded and breaks file copy with MigrateFileUri.