Closed (fixed)
Project:
Image
Version:
5.x-1.x-dev
Component:
image.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2006 at 18:18 UTC
Updated:
31 Aug 2008 at 17:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
Zed Pobre commentedI know this can happen if the image gallery module loses track of whether a thumbnail file has been generated. If it doesn't think one exists, it will display the original size. I fixed this issue by changing the size of the thumbnails and then immediately changing it back, which seems to have forced them all to regenerate and stay that way... except that this problem has extended throughout my image library (which is quite large) to other sizes as well, so some images aren't displaying at all. I've been trying to force images to regenerate by altering the other values and back and well, but so far the results have been very irregular. Image regeneration seems to be extremely buggy in general, but I'm not sure where to even start looking for the problem.
I wish admins could get a little link on each image page (and each gallery category) that simply says "force regeneration", which would regenerate all of the components on that individual image or images in the gallery.
(Incidentally, the component for this should be image_gallery, but the only component that the preview button seems to think is valid is image_attach. Go figure. I'm not even sure where to submit that as a bug.)
Comment #2
kuahyeow commentedhmm, you're not alone.
I just finished a 4.7 website with image_attach, which had the images mysteriously dissappearing on two occasions so far.
All I know is hitting submit on admin/settings/image_attach regenerates them all back again. [haven't had time to investigate further..]
Comment #3
TheFazz commentedi have a similar problem which occurred when i was making some adjustments to my database tables... prefixing for sharing databases. i have a number of images in my gallery so manually adjusting each is to be avoided as far as possible.
what happens is in the gallery view, some images are displayed in their original sizes - although others are in their thumbnail format. so i get a messy gallery view with overlaps of images.
Comment #4
n4t3 commentedI've had the same thing happen today. I'm brand new to Drupal but in settings I have the following:
# image
# image_attach
# image_gallery
# img_assist
In the settings for image I had thumbnails set to 150,150 (before uploading anything) and preview set to 640,640. Everything was fine for the about three days of uploading images and assigning images to galleries. Then today I decided to change the thumbnail size to 100,100. This was fine - all the thumbnails generated fine. Then I tried 130,130 and had no problems, then finally 140,140. It was either at this point, or after trying 135,135 that I noticed some images displaying at their original size. I freaked out and couldn't get it to work again properly. I tried re-uploading a backup of all the images in the files/images directory, no difference. Luckily, I had a backup of the database. I blew away the database, created a new one of the same name, uploaded the SQL backup, and all the files in the image directory and everything was working again. Obviously this was a drastic move, and it was only luck that I had a backup. Is there a better way to handle a problem like this? How do I go about re-generating all thumnails manually? I read above that "admin/settings/image_attach regenerates them all back again", but is this a problem in image_attach or image or which?
Comment #5
kuahyeow commentedAh! Sorry, my mistake:
I meant -
admin/settings/image
Then click on the 'save configuration' button, to get all the disappeared images back.
Comment #6
TheFazz commentedmy problems is images resizing back to the original size in the gallery / thumbnail views. kuahyeow's problem is different (disappearing?)... and the solution suggested does not work for me.
Comment #7
TheFazz commentedI was just wondering whether anybody was working on this. the above suggestion did not work for me.
Comment #8
Steve Dondley commentedHere is a patch that fixes the symptom, not the root cause. So it's not a proper patch. This temporary fix simply regenerates the derivative images if it detects the thumbnail is missing.
After looking at the database, I discovered the root cause of the problem is that somehow, the thumbnail and preview entries get deleted out of the {files} table. The entry for the original image remains in tact. The _image_remove() function in the image.module looks like just the code that would do that. It has this line:
I don't know how or when the _image_remove() function would get called. I suspect there is some weird interaction going on between image_gallery.module and the image.module. Maybe the people who are more familiar with these modules can take it from here.
Comment #9
drewish commentedmarked http://drupal.org/node/106539 as a duplicate of this.
Comment #10
kuahyeow commented#6(TheFazz) : My mistake again. I misread the description. sorry my problem was dissappearing, therefore not related to this issue.
#8(Steve) : I recently moved webhosts and found that the problem has now cropped up, that is thumbnails being resized to original. Tried your patch, had thumbnails come back on, but sometimes, white pages result instead. So, I removed the patch and now everything's fine.
Could it something to do with moving or the (re)-creation of "file/image" folder?
Comment #11
Steve Dondley commentedkuahyeow, interesting. Do you know if your current host is running fastcgi? I run my own servers and run fastcgi on them. I'm not sure why that would cause the problem. I'm just grasping at straws, really.
I have not had problems with the white screen. That's indicative of a memory issue with php. It's probably set too low on your server. I have my memory limit jacked up on my server so that's probably why I'm not seeing it. I could see where resizing a bunch of images at once could put you over the limit.
Comment #12
kuahyeow commentedYup, the new host is running fastcgi, how would that cause it? Anyone?
Yeah, I suppose that white screen is due to the memory limit.
Comment #13
drewish commentedi've marked http://drupal.org/node/123288 as a duplicate of this
Comment #14
dman commentedI'm getting the same (new Drupal 5 install, fresh tarball)
For me it happens any time an image is updated. I add an image . OK. I go back to it and update its details (or just save) and the two generated entries go missing, displaying only the full-size everywhere.
in image_update(), where it checks
it's always returning null for the DB check - $old_path returns blank - although I saw the row in the database a second ago. So I guess that _image_remove() is the problem.
... on submit, the form is validated via image_form_image_alter();
In that func, if there is no error, and there is no new file, ... all existing info is removed! That seems backwards. It's theoretically supposed to re-gen them each time (waste of time, but whatever) using _image_build_derivatives() ... yet that's not working?
No, they are being built OK, but being trashed during image_update().
... because it thinks the derivatives are the same as the original. As indeed they apparently are when image_update() is being called. That's wrong.
They were OK just after the submit validation...
The paths got reset somewhere between and image_form_image_alter() image_update()
All the derivatives are being set to be the 'original' path. ?! Where and why?
Arrg. This is too hard.
Help!
Comment #15
herb commentedI had this problem whenever I edited an image. (Even just changing the title) - and would then get the errors that the "file could not be copied because no file by that name exits error" - with one error message for each size of image file that was being generated.
The image would then subsequently appear in full size.
However, using the "newest" Image 5.x-1.x-dev - As of today, I still get the errors, but the image is updated correctly and no longer ruins my gallery by being displayed at full size. So it seems that progress is being made!
Comment #16
drewish commentedmarked http://drupal.org/node/121114 as a duplicate
Comment #17
Tim_O commentedI applied the patch Steve Dondley posted above (thank you, Steve!), which solves the issue but still leads to error-messages being displayed. Seems this has been around for a while, is where really nobody working on this? Really an annoying problem and it sounds to be a minor thing. I would attempt to look into it for myself, but being a newbie concerning both, PHP and Drupal, I seem to be the last one to effectively deal with this. Anyway, thx to all who bring ahead all these projects!
Comment #18
drewish commentedmarked http://drupal.org/node/124474 as a duplicate
Comment #19
dman commentedSteves patch helps, but still, as noted, shows errors, which is not great.
The patch over here does a better job, but technically is still not a solution IMO.
I've been through the code and it is hairy. I cannot understand what it's attempting to do or why it does so. I don't even understand what the desired patch would look like!
:( I'm sad.
+1 critical!
Comment #20
Steve Dondley commentedSetting this back to 4.7. That was what I originally filed it under. I think the people who are getting errors with the patch may be on drupal 5.
Comment #21
dman commentedOK yes, I thought this was Drupal 5. I patched manually (by sight) so didn't notice :-} . Sorry.
Comment #22
geodaniel commentedWe're seeing this issue too. Just setting the status bits and based on Steve's patch in #8 I think image module looks to be the correct queue for this patch.
Comment #23
geodaniel commentedComment #24
Chris Johnson commentedSince this is broken similarly in the Drupal 5 version, what's the proper way to get that fixed, as well? A separate ticket?
Comment #25
plumbley commentedI've uploaded a patch at http://drupal.org/node/68623#comment-277959 which modifies image_display() and image_load() to try to fix this type of problem (and the related "Image sizes skipped if smaller than preview" problem). I've linked it from a few other threads since many of these issues may be connected. I realize a major update to Image 5 has recently taken place, but any feedback on this 4.7 version is appreciated. Mark.
Comment #26
Renee S commentedI have this problem in 5.1 (and in 5.2). I'm running the latest version of Image and Image Assist.
Images suddenly appeared at their original sizes instead of thumbnails last night. Regenerating thumbnails resulted in a timeout - it appears that the module keeps regenerating the same file, deleting it, and regenerating it, over and over again, until my PHP timeout is reached.
Comment #27
drewish commentedz allen, this issue is for 4.7. if read through it you'll find links to a 5.x issue which fixed this. upgrade to the 5.x-1.4 release. if you're still having the same problem open a new issue.
Comment #28
sunDevelopment and support for 4.7.x and 4.6.x has ended. You are strongly advised to upgrade to Drupal 5.x or 6.x.
Comment #29
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.