When I import images with imagefield import, it doesn't place them into proper folders. First I've imported a few images and it placed them into my tmp directory. Second time, I've imported only one image and it placed it into first folder from my path(1/2/3/, it placed it only into /1/). I assume that there is some bug with path loading.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | imagefield_import.patch | 963 bytes | danieljames |
| #4 | imagefield_import.patch | 428 bytes | danieljames |
Comments
Comment #1
vordude commentedSorry Ivan, I'm not following...
You did to consecutive imports, and the images ended up in different directories?
Comment #2
Anonymous (not verified) commentedI have set path for my cck imagefiled to "img/galeria/[termpath-raw]" = 3+ folders. As I wrote, first time it "imported" images into tmp folder, second time(1 pic) to the "img" folder, but it should import them into "img/galeria/sterm1/term2/term3/".
Comment #3
pkej commentedI have the same problem:
1. Enable imagefield, filefield_paths and tokens (perhaps even pathauto?)
2. Use tokens in the supplied fields from filefield_paths, for example date.
3. Import images into nodes.
4. Notice how you will find a directory in your files directory called the path you entered in #2, and with the TOKEN in place somewhere in the directory hierarchy or file name.
5. Edit the node.
6. Voilá the file is in its correct place. No data is lost.
I imported about 70 pictures yesterday storing them in a directory structure where I change the name of the images to the same name as the node gets, and it performed as above. Since IMAGEFIELD_IMPORT, doesn't set any language data when available, I had to edit every picture anyway, so no biggie for me, but a gotcha for unwary users.
Comment #4
danieljames commentedThis problem might be because imagefield_import doesn't try to create a new directory first. The attached patch works for me.
Comment #5
danieljames commentedI forget to use the unified diff style - here's the patch using that.
Comment #6
sgriffin commentedThanks for the patch. This should be committed.
Comment #7
link0ff commentedI don't understand why this patch is needed. After fixing #591494: Image file tokens are ignored, now Imagefield_import puts image files into the right directory. But when I tried the patch attached above, it only creates unnecessary temporary directories like "files/[termpath]". So without the patch above and with the patch from #591494: Image file tokens are ignored Imagefield_import works correctly for me.
Comment #8
gp.mazzola commentedI am reporting the same problem.
I am using latest version of imagefield, imagefield import e filefield paths and token.
In my case I am not using token in the path of my CCK imagefield. The path is just:
/images/
relative to sites/default/files
When I upload through imagefiled import, my images don't go to the right folder, but just in the drupal's filesystem root.
No difference if I use the suggested patch.
Thank you.
GP
Comment #9
link0ff commentedPlease specify what a patch did you try?
Comment #10
gp.mazzola commented@Jurta
I have tried patch at comment #5 of this thread!
Ciao,
GP
Comment #11
mojzis commentedthis one (#5 above) solved my problem, i think it would help a lot to commit it. thanks !
Comment #12
wulff commentedA fix similar to the patch in #5 has been added to the latest dev version of the module. (See the imagefield_import_batch_import() function.)