This is a fresh install of the latest 3.0rc2 module thus no need for update.php
I have a custom content type (program-photos) with an Image FUpload field called (field_program_photo).
I have an imagecache preset assigned at "Preview Image Preset" called (program_photos_thumbnail).
I create a new node at http://mysite/node/add/program-photos and upload two images to the content type.
Once submitted and I click, "Next step" which takes me to:
http://mysite/node/add/program-photos/list_imagefields
I get two broken image tags on the page:
http://mysite/sites/default/files/imagecache//japan_0.jpg
http://mysite/sites/default/files/imagecache//kennedycenter.jpg
I can see the files successfully uploaded to the files folder:
/mysite/sites/default/files/kennedycenter.jpg
/mysite/sites/default/files/japan_0.jpg
Under the folder (/mysite/sites/default/files/imagecache/), I can see my imagecache presets like (/mysite/sites/default/files/imagecache/program_photos_thumbnail) but not the images I just uploaded.
What's causing this?
Comments
Comment #1
grandcat CreditAttribution: grandcat commentedIt's neither a critical issue nor a bug.
You should try to set another imagecache preset and try it again.
Comment #2
jrabeemer CreditAttribution: jrabeemer commentedI created another imagecache preset. I set Preview Image Preset: * to "scholar_thumbnail"
I create a new node at http://mysite/node/add/program-photos and upload two images to the content type.
Once submitted and I click, "Next step" which takes me to:
http://mysite/node/add/program-photos/list_imagefields
I get two broken image tags on the page:
Now, I created a new imagecache preset called "TEST" which has a simple 50% resize action. I set Preview Image Preset: * to "TEST"
I create a new node at http://mysite/node/add/program-photos and upload two images to the content type.
Once submitted and I click, "Next step" which takes me to:
http://mysite/node/add/program-photos/list_imagefields
I get two broken image tags on the page:
The images are uploaded to the files folder but there are no derivative images from the uploaded images in the imagecache subfolder.
Shouldn't the path be..
Example: http://mysite/sites/default/files/imagecache/TEST/asimo_0.jpg
Comment #3
grandcat CreditAttribution: grandcat commentedThe path is generated by ImageCache, so it should work. Additionally, it also works for me.
Try to disable Token and other similar modules and try again.
Comment #4
jrabeemer CreditAttribution: jrabeemer commentedI disabled Token and Pathauto. I still get the same result. The images upload, but the path is wrong and the derivative imagecache images are not generated.
I am using the latest code:
Acquia Drupal 1.2.9
Token 6.x-1.11
Pathauto 6.x-1.1
Image FUpload 6.x-3.0-rc2
ImageAPI 6.x-1.6
ImageCache 6.x-2.0-beta9
ImageField 6.x-3.0
FileField 6.x-3.0
CCK 6.x-2.2
What modules are you using?
Comment #5
grandcat CreditAttribution: grandcat commentedIt seems that your selected imagecache preset is not used correctly. I have to check this closer.
Comment #6
blup CreditAttribution: blup commentedWere you able to solve this problem? Today I had it working for a while, and then it broke (just like you describe - all images suffixed by a _0, they dont display, and they aren't saved into the appropriate folder). I tried all the same settings in another website, and it worked again. Trying to troubleshoot, i copied all the modules from one website to another (assuming the problem came from a module upgrade), and then it broke again. Thus, I am led to believe this is the problem of some upgrade somewhere.... but after 2-3 hrs of searching, i'm giving up for today. Please let me know if you figure it out.
Comment #7
blup CreditAttribution: blup commentedOk, 5 mins after my previous post, i figured it out (at least for my case). The problem has to do with the file-path settings and token. If i enter something with a token, my upload breaks, and if i leave it empty, it works fine. I am also getting this message, whether it works or not "warning: Invalid argument supplied for foreach() in ...\sites\all\modules\image_fupload\includes\images.previewlist.imagefield.inc on line 44.". This is probably unrelated, but i wanted to make the observation. I need to save these files with token values, so i believe this is still an important issue. Thanks!
Comment #8
blup CreditAttribution: blup commentedNevermind my last post. The problem is not with Token, but with the filepath field in general. Anything i write in it makes the uploads break for me.
Comment #9
awolfey CreditAttribution: awolfey commentedsubscribe
Comment #10
blup CreditAttribution: blup commentedAlright, after working on this for a while, i looked at a related thread (http://drupal.org/node/409070) and then copied this code below from another module into image_fupload_imagefield.module . Right now it works, as it creates the appropriate folder, but it doesn't work well with Token. For example, my filepath is users/[user]/images and after uploading two images, there are two folders created: users/[user]/images and users/viz/images, and all the images fall on the first one. The code creates the appropriate folder, but the images are misplaced (or don't get moved).
Comment #11
wesjones CreditAttribution: wesjones commentedsubscribe
Comment #12
svenhs CreditAttribution: svenhs commentedHad the same issue (broken imagecache-thumbnails after upload --> but original files stored in the right path). For me deactivating the Fupload module and reactivating it again, solved the problem.
Comment #13
valante CreditAttribution: valante commentedOkay, been digging into this for half an hour now. Here's what I found:
1) I have a CCK image field configured to work FUpload and an ImageCache preset called AlbumPreview.
2) In the variables table, the relevant variable (image_node_types) was set to:
3) Notice the "AlbumPreview" string after the "imagecache_preset" in the first array element (represents the original field), and the "N" after the "imagecache_preset" in the second array element (represents the CCK image field)
4) Changed the last N to s:12:"AlbumPreview" in the table
5) Voila! I get thumbnails.
So now just have to find who writes to image_node_types, and why it misses the preset name...
~ Tal
Comment #14
valante CreditAttribution: valante commentedNarrowing down the problem:
The culprit is image_fupload_imagefield_widget.inc .
For some reason, the 'preview_preset' => $widget['fupload_previewlist_img'] doesn't get the preset name.
Compare with image_fupload_image.admin , where it says:
I tried wrapping the preview_preset in an array, but no luck.
I've tested this theory by creating a new content type, adding file field with FUpload widget, and then checking the variables table. Yup, it enters N instead of the preset name.
Anyone cares to jump in? I don't actually know a single thing in PHP, I'm just doing some C#-style bug-hunting, and I think I've just reached my limits.
~ Tal
Comment #15
valante CreditAttribution: valante commentedOkay, ignore last post - I misinterpreted the array thing. Happens when you don't know the language, like I said. I'm still pretty sure the problem is there, though. The 'preview_preset' => $widget['fupload_previewlist_img'] doesn't get the preset name into 'preview_preset'.
Would very much like to see someone solve this... It's holding me back in a project I'm working on.
Thanks,
~ Tal
(P.S. Sorry for all the posts today)
Comment #16
Primsi CreditAttribution: Primsi commentedsubscribe
Comment #17
kirilius CreditAttribution: kirilius commentedSubscribe as well.
I am getting mixed results as well. When I am using custom token-based paths, it tends to break a lot more leaving me with a page listing a bunch of images while no imageas are actually visible.
Comment #18
kirilius CreditAttribution: kirilius commentedActually even without the token getting in the way, I am not seeing thumbs after I click on the next step. After I save, the images are preserved and thumbs show up, but not the first time. In fact the path to the supposed thumbs contain // (two slashes with nothing in between) suggesting that the imagecache path is not getting generated properly the first time.
Comment #19
Steve Dondley CreditAttribution: Steve Dondley commentedI can confirm comment #13 above (http://drupal.org/node/473602#comment-1778016).
That serialized data with the "N" in there is messing things up. After I replaced the value of the image_node_type variable with data from an old snapshot of the my database, everything worked fine for me, too.
DID NOT WORK:
WORKED:
Comment #20
phenaproximaAny chance of a patch for this? I just ran into it, and the solution in #13 worked for me too.
Comment #21
AdrianB CreditAttribution: AdrianB commentedSubscribing.
Comment #22
semperos CreditAttribution: semperos commentedHere's code you can slap into a custom module to make #13 easy. Add this to your module, replace MY_MODULE with your module's name, and you'll be able to go to http://example.com/fix-fupload-preset to automatically fix this issue.
I've found that the problem "crops up" as I use this module, so I've coded the menu item as default so you'll see it in your Navigation if you have the 'administer site configuration' permission. Here's the code:
Comment #23
igorik CreditAttribution: igorik commented@semperos - your code doesn't work for me, I added it into my util module but still no thumbnails.
Comment #24
Anonymous (not verified) CreditAttribution: Anonymous commentedSame to me, but there are some hints:
After several hours testing why there are no image Preview in the edit caption page. I add another imagecache preset named " editcaptions", and it works. My previous imagecache preset is only "200x200". Is the special character breaking the path??
By the way, remember to enable the imageAPI ;) just a friendly reminder.