Closed (fixed)
Project:
Migrate
Version:
7.x-2.4
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Oct 2012 at 02:01 UTC
Updated:
3 Mar 2016 at 11:33 UTC
Jump to comment: Most recent
Comments
Comment #1
mikeryanYes, it does support URLs, just map them directly. Are they not working for you? Are you getting error messages?
Comment #2
mixhael commentedWhen using the following I get tons of 'The specified file %file could not be copied to %destination' kind of errors
When just simply mapping, as follows, the same problem applies:
Not sure what you mean by mapping 'directly'. Care to elaborate?
Tnx!
Comment #3
mikeryanNote: when the issue status is "postponed (maintainer needs more info)" and you're providing the requested answers, change the issue status to "active" to be sure your answer gets reviewed.
By 'directly', I meant the field_profile_photo mapping.
Now, the problem here is that source_dir is a subfield of field_profile_photo, so your second mapping should be:
See http://drupal.org/node/1540106, under "File and image fields".
Does that make it work?
Comment #4
mixhael commentedThanks a lot, that does work now. However, now I stumble on a related problem: although the error messages are gone, it seems the mapping has not taken place. When I edit the respective node, the image is not loaded in the profile photo field. However, they are copied to my sites/default/files/../.. directory
Here's relevant code:
And here's my full class
Comment #5
mikeryanI don't see anything obviously wrong, although I notice you're setting the node default language - what about the field's default language?
Comment #6
mixhael commentedWorks now! tnx
Comment #8
bogdan1988 commentedHi, I will leave this comment for someone who will experience same problem as me.
I am using migrate_d2d framework to migrate files from old website to new one.
First I was trying to migrate files from my local folder (public://old-files). in hook_migrate_api().
But then we was not able to get production files archive on time.
That's why we changed approach. We decided to load files directly from remote website
Please note that only website url without files directory path didn't import remote files:
Hope it will help someone.
Thanks