Editing an image node deletes the original image and thumbnail with errors about not being able to find them. I don't know if this is related to all the other path/file problems reported for this module, but it would be nice if somebody could at least confirm this problem.

Comments

gordon’s picture

Priority: Normal » Critical

Yes this is a problem, I have started to investigate it but ran out of time, Basically I think that it is because the image_id is being updated even when the image is not being changed, and then later when the node is being saved it is deleting all the images as it is expecting to have to move images from the temp dir to replace them, but there is none there.

I was going to take a better look this weekend, but if someone else comes up with a fix before then.

Ian Ward’s picture

The problem I just noticed which brought me here sounds related: I was adding an image to a gallery, then, hit preview, and the second thumbnail on the preview page (there is the first thumbnail which is the 'preview' and the second which is where you can further edit the node) was replaced by another thumbnail in the gallery. I then tried previewing again w/o making changes, and same thing - the first image is still the image I am trying to add, but the second image is some thumbnail from another picture in the gallery. Then, I went ahead and submitted the image node to see what would happen, and the new image I was adding overwrites the (second) thumbnail that was occuring incorrectly in its place during the submission. So, now there are two images in the gallery of the image I was adding - one in the term I was trying to add it to, and the other in the term page of the image it overwrote. This is hard to explain, so hopefully I'm clear enough.

jsbthree’s picture

Title: Editing an image node deletes the image » Request Entity Too Large

I don't know if this is related. It seems so for these reasons. I feel this is something foolish I'm doing wrong but my ISP is also baffled. They've had about 5 techs look at the issue and no one has a clue.

http://drupal.org/node/view/10640

1. It happens only with image upload -- i.e. not file or even image attachments or attachements that are images (I hope that is clear but put another way the beloe appears to be a problem with the size of the image but in fact is not for it is a system error being generated outside Drupal that is related to something other than the actual size of the image being uplaoded even though 413 would suggest that it is -- it isn't ).

2. The usual settings with php.ini .conf ect have been tweaked and retweaked.

3. The issue only came up on an install updated from head last week to head a few days ago.

4. It can't be reproduced on another older installation of drupal yet is very reproducable here.

Some hints: the specific error points to the word Entity which is a specific tag only -- to my knowlege -- used in http 1.1 to deal with versions of the same file.. I am not that much of an expert on http headers so forgive me if I'm sound dense. I'm just hoping this helps for it seems to be baffling others too.

My brain needs to calm down before I can make sense of it actually and don't want anyone to take it too seriously as its as I said likly the product of too much work and too little time. I seem to have narrowed it down to the way Apache deals with http 1.1 and specificall the POST -- something about the byte size of the actual url or soemthing but .. beyond that I'm not clear.. right now anyway

I beleive it is an interaction between image module and something else for droping back a few versions of image.module will not change the erroe while dropping back a few versions -- ie dates of cvs seems to. This is a very random way of approaching this but I wasn't trying to isolate the problem as I kept thinking it was my setup. I just don't know.

Some wierdness is that it will allow uploaded images of below 30K or so.. but that's it..

bruno’s picture

Title: Request Entity Too Large » Editing an image node deletes the image

Please leave the title unless you think it is not explanatory. If your problem is different, but related to this defect please submit a new bug report.

ixis.dylan’s picture

Thanks for the recent CVS changes that address this problem! Hopefully somebody can work out why the database isn't being updated, too, now that the file problem is solved. It would be nice to get this in for 4.5, if anybody has the time and motivation.

gordon’s picture

Assigned: Unassigned » gordon

I have fixed this in cvs, I am pretty sure that the problem was that the image transformation routine, was always working on the image that was stored in the main repository. so if you did no manipulation of the images, there was no copy in tmp, and the original would be deleted.

I have added some protection so that if there is no image in tmp, it would not try to copy the version from tmp to the main store. Also I made a change so that in the transformation if an image existed it would do the transformation on that, and not copy a new one.

ixis.dylan’s picture

It works! You've stopped my users whining about the lack of image galleries, and that's priceless.

Thanks.

Anonymous’s picture