I see the "mappable field" called "FileField: Stock Image 1 source file path" on the edit page of a content set now that I've enabled "Support for the filefield module." But I also see that my pre-existing images make use of three fields in the db: "list," "data," and "fid." I've tried (in order to test) adding various text string paths to existing images into the "default value" for one of these image fields - but to no avail.

Before I chase my tail on this, is it even possible to migrate image paths (using migrate extras 6.x-1.0-alpha1, image cache 6.x-2.0-beta10) and have them show up - or will it not work because imagecache is looking for those three fields instead - ?

Comments

frankcarey’s picture

Component: migrate_extras » Migrate Extras Features

Importing the files themselves is currently not supported, only when importing them along with a node to a filefield. How you have filefield setup on your existing site will determine where the files actually end up, and the timestamp, fid, etc will all be brand new. I'm working on importing files this week as their own content type, so stay tuned if you need that.

frankcarey’s picture

Status: Active » Postponed (maintainer needs more info)
khosman’s picture

Thanks for the pointer - in fact, I had found that thread you list there in your second post before posting my question.

I hadn't been trying to import the file, it hadn't even occurred to me. I simply assumed that the process was simply looking for a path to the images. Given that, I tried placing several combinations of paths into the "source file path" with no luck. (Not that there isn't a correct path - just not one I could figure out.) I saw that there were three fields - none of which corresponded to an actual path - so it caused me to question whether I was approaching this correctly. Hence, my original question: Given the setup I outline above, am I supposed to be able to put in a path (to where I place the images) and the images show up, presumably automatically filling in those three fields?

frankcarey’s picture

It *should* be the full path to your existing file. Where the files will end up in your files directory is based on your settings for that field.

khosman’s picture

Thanks for the pointer - that's what I was looking for.

frankcarey’s picture

Status: Postponed (maintainer needs more info) » Fixed
khosman’s picture

When I enter a path to an image into the "FileField: Image 1 source file path" default (there in the "mapping" area of migrate) I get nothing when I migrate. I've "placed a test image in a particular folder, then tried several different "addresses" for that image, like:

"wamp\www\sites\all\images\imagetest.jpg"
and
"C:\"wamp\www\sites\all\images\imagetest.jpg"

...to no avail. It doesn't matter where this initial image exists, right? Just as long as I get the image's path correct. Any thoughts on what's missing here?

frankcarey’s picture

you are using windows, so I'm not sure the best way to do this on you machine, but try putting the import images inside your current files directory "sites/mysite.com/files/import/myimage.jpg" , then use "import/myimage.jpg" and see if that works for you. When you are done, you can then just delete the import/ folder.

khosman’s picture

Thanks - I tried that and the images remain AWOL. I've tried everything I can think of, the obvious, the not-so-obvious, from changing forward slashes to backward slashes, full paths including the "C:" and truncated paths of all sorts. Nothing.

Note that placing anything in that image path default field (in migrate) causes "duplicate entry" warnings unless I clear all records before each migration (something unnecessary otherwise): If I put a default directory + image into the default migrate field, I get the "duplicate entry" warning; when I remove the string the warning stops. I don't know that I was getting that warning earlier in my testing, so it may have something to do with table relationships I've added since - but the warning does immediately appear when adding the string into the default field.

Also, I've checked my "File system" page and have confirmed that the images to be "picked up" (as described above) are in the corresponding folder (the "file system path" is set to sites/default/files and the test image is "sites\all\images\expanded-4-1.jpg") - but maybe it should be set to something else?

khosman’s picture

I've solved a small part of the riddle: Setting autopath (in "Site Bldg > URL Aliases > Automated alias settings > General Settings" > Update Action) back to "Do nothing. Leave the old alias intact" made the dupe content warnings quit appearing. (I had monkeyed with that in the last day or so.) Beyond the dupe content warnings, it had also been sending my system into endless loops whilst migrating. Setting it back to "Do Nothing" fixed that small issue.

Still can't get those darn images to appear though....

frankcarey’s picture

if you are importing using drush, you should be aware of this #729634: drush migrate-import runs as the system user, which can affect file permissions.

khosman’s picture

Status: Fixed » Active

Thanks - but nope, I'm not using Drush.

mikeryan’s picture

Status: Active » Closed (won't fix)

Migrate and Migrate Extras V1 are no longer supported.