Closed (duplicate)
Project:
ImageField
Version:
6.x-3.0-beta3
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2009 at 10:41 UTC
Updated:
20 Mar 2009 at 11:30 UTC
CCK 6.x-2.1
Filefield 6.x-3.0-alpha6
Imagefield 6.x-3.0-alpha4
public download
When adding/editing a node, the uploaded images thumbs don't appear. The image is uploaded alright on the server in sites/default/files, but the file original_filename.jpg.thumb.jpg does not exist. I presume this thumb is supposed to be generated on the fly when the image is being uploaded, but this does not seem to work on my site. Not sure how to go about debugging this, so hopefully someone has encountered this bug. (Could not find it in the issue queue).
EDIT: the watchdog does not complain either.
Comments
Comment #1
eknowlton commentedI also had this problem. I let it be for the longest time, but just got into it.
After doing some testing, I have come to the conclusion that when I switched the drupal download file system to "private", that the image field thumbnail wasn't getting the attention it needed to be displayed.
It seems like that when the image is uploaded, the image filename ( yourimg.jpg ) and location ( C:\path\to\files\yourimg.jpg ) were set in the {files} table, but the thumbnail was neglected to be recorded in the {files} table as well.
Seems like a simple query to insert the thumbnail into the table would do.
I keep going through the files and I'm not exactly sure where to actually put it. Ha.
My quick fix...
On line 23 of imagefield_file.inc:
Although, I ran into some issues with the following issue.
------------------------------------------------------------------------------------------------------------------------
Not sure if I should make a seperate issue but....
it seems that if you try to upload a image with the same name as image in the files directory, it renames the image to _#.xxx .
But fails to update the $file object so when $file->filename is passed to the database {files} table, its not the correct filename.
Comment #2
quicksketchThe private files bug has been fixed in #301888: Image previews fail to display with private files directory outside of web root. Please open a new issue for the renaming of files. I'd highly recommend trying out the latest development versions (backup first) until the next beta version is released.
Comment #3
j0rd commentedI created a module to regenerate thumbs for people who have lost them. I had this issue, so I created the module to recreate my thumbs. Ran it and it seems to have worked.
Imagefield Thumbs Module:
http://drupal.org/node/336264#comment-1379868
Comment #4
antiorario commentedRemoved my own comment.
Comment #5
antiorario commentedSee #301888: Image previews fail to display with private files directory outside of web root.