For various historical reasons the Drupal 6 site I am migrating has a lot of assets with file names containing spaces. When attempting to do a file migration in migrate_d2d from Drupal 6 to Drupal 7 all of the file migrations on the files containing spaces appear to be failing. Error message typically is
The specified file http://tcdailyplanet.net/sites/default/files/secor_photo by Pete Thompson_0.jpg could not be copied to public://secor_photo by Pete Thompson_0.jpg.
Some others also fail, but most of those are because the original file actually does not exist - but in these cases the original file exists and at that path, but apparently not being copied because of the space in the name.
This migration is set up directly in the GUI and seems to be working fine for all the files that exist and do not contain a space in the name. I'm hoping there's some solution to this that I'm just not seeing.
Comments
Comment #1
TomtomVer commentedHello Steve,
I m stuck in the exact same situation.
Did you find any solution for this?
Thanks a lot,
Thomas
Comment #2
pavlosdanHi Thomas,
I had the same issue and what I ended up doing was find any files that were referenced by the ROW in the 'prepareRow($row)' function and rename them all just in case they had a spaces in the title.
Attaching the following snippet of code that I ended up using in 'prepareRow' in case it helps anyone. I adapted this code from another issue but I cannot find it to reference it.
Note that I am not doing the migration through the GUI though.
Comment #3
cthos commentedI'm having trouble duplicating this issue. I haven't had any problems just running straight through a migrate_d2d_ui. What do your settings for that file migration look like? Did you set urlencode to something other than the default?
Does that first file exist exactly as migrate is reporting in the error?
Comment #4
mikeryanComment #5
fonant commentedI can reproduce this, for a hand-coded migration based on migrate_d2d.
By default the file migration will URL encode the source pathname. You need to ask it not to do this if the source files come from a local directory.
e.g.
The last one, setting urlencode to FALSE, is required if the source path is on the local filesystem.