I had issues with editing images (upload worked but when editing the previews got corrupted, see http://drupal.org/node/124474). Drewish assumed upon my description that I rather have a problem with my file paths and told me to open a new issue (thx for advise), so here I go ...
My settings and what I did ...
settings/file-system / file system path = files
settings/file-system / temporary directory = files/tmp
settings/file-system / download method = public
settings/uploads / list files = yes (resolution and sizes should be appropriate with 1400x1050 and 8/200 MB)
settings/image / default image path = images (other dimensions by default: thumbnail 100x100 and preview 640x640)
settings/image_attach = disabled (I would enable it but disabled it until this works ok)
As described I had problems with editing images before. I had applied a patch from one of the bug-reports for this issue. Unfortunately I don't remember which one on which version. Anyways, I downloaded the image-module 5.x again (updated yesterday I think), deleted the old module directory, copied the new one, performed the database-update. So it should be freh code, right? When testing I realised the upload of my 4 MB file takes more than 30 secs, so I had to adjust the timing-parameter in the php.ini, which I did.
Here is what happens now when I upload an image now (create content/image), I get
The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.
... immediately after submission. The image displays ok, however, but only for preview and thumbnail - the orig isn't there. After that submission I checked what files I have in the image folder and found there to be:
x.png
x.preview_0.png
x.preview.png
x.thumbnail_0.png
x.thumbnail.png
... while no files remained in the temp-folder. So the thumbnail as well as the preview is there two-times, while the orig isn't at all.
If I go on edit and then directly on submit, I get the above error-message two-times and all images are gone from the node. The file-system shows
x.png
x.preview.png
x.thumbnail.png
existing in the image-directory.
I checked the apache-logs, but found no errors. I checked the syslog additionally, but no errors.
What can I do to approach this problem and solve this issue? Any help appreciated.
Comments
Comment #1
t4him commentedbumping this post; having the same issue
Comment #2
Tim_O commentedWell, at least some kind of reaction. And although it does not really help, it's still good to know I am not alone with my problem :o I have for now set the rights to not allow users to upload or change images. As the "super-user" I am still able to do so and have played around a bit. It happened that I made a test-upload with the expected results (as described here). Although I had'nt looked at the filesystem this time, I noticed the original is missing and thus went on to delete the image. I was wondering quite a bit than I afterwards still found the image listed within the content-list. Now I took a closer look and funny, but there was the image correctly with orig and all. However editing once again broke something so I deleted this instance as well. However it seems to me the module created to nodes, one complete and one incomplete. Maybe this helps someone who is looking into the code - I tried to do so, but being complete unfarmiliar with both, the Drupal-API and PHP that didn't yield much results.
Hope someone more experienced is on this? As long, as nobody tells me I really do have a configuration-problem, I see this as a bug. Accordingly I changed the Category. Now, that someone else announced to also have this problem, it seems to me this is appropriate?!? Also maybe someone looks at this then, it seems support-requests are not looked at very often?!? Hope I don't do anything wrong though ...
Comment #3
drewish commentedhonestly, it probably is a bug rather than a configuration problem. there's still plenty of wonky code in the image module, i'm trying to clean it up one patch at a time but it's going to take a while.
could you try enabling the image_import module and importing a few images? this will help narrow the problem down to either uploading or saving files into the files/images directory.
Comment #4
Tim_O commentedSure, if you just tell me how to help I am always willing to try. It's just that PHP and Drupal are new to me and it will take me some time to learn to take my own steps here, so any help on this way is appreciated.
What I did - I copied a picture x.png to the import folder and went to "Import Images". I selected the file, chose a gallery and went on. It took a while (4 MB file) and I got the message "Successfully imported: * x.png as x.png [edit]". The file has disappeared from the import folder and I got x.png, x.preview.png and x.thumbnail.png in the image folder. The image also displayed ok, so it seems to work using the import (hadn't tried before as I was dealing with single images so far). I then went on to edit the image and simply pressed "submit" and wow, even that worked without any errors. I went to edit it again and chose to delete it - the node and files disappeared without any errors, also ok it seems.
I then went on to upload the same picture using create content/image. I entered a name, chose the file and the gallery, and entered some text as description. Pressing submit resulted in the stated "The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename."-error. The file-system now showed:
x.png,
x.preview_0.png,
x.preview.png,
x.thumbnail_0.png and
x.thumbnail.png
So the same files than above existed plus the additional _0-derivates. I noticed that there were two nodes created, one with the title I entered and one with with the file-name as the title. I had been wondering about files still being there before but hadn't realised this is this case until now. Any idea where this comes from?!? The one with the filename as the title has the correct linking to the without-_0 files, while the one with my title has the linking to the _0-files with the orig pointing to x_0.png (which doesn't exists). I was, however, able to delete both nodes - producing an error on the the one with the not existing file but properly removing all files and the nodes themselves.
So the conclusions I can draw from this is: the edit functions seems to work ok per se (if it is operating on a correctly stored image). However the function used within create content/image seems to be buggy and produces a not properly configured image-node, additionally producing a working one (for which it ignores the entered title/text). Do they use seperate functions for node-injection?
Am I right so far here? What can I do to further narrow down the problem? Any way to trace the function calls? Any other thing I could do to help approach this problem?
Comment #5
drewish commentedyeah, they're different paths for moving/uploading the files. the node with the filename was the one created by image_import. if you imported and uploaded the same file, you'll get the filename_0.jpg when you upload the second copy.
so, it sounds like the problem is with the uploading files. one patch that might be helpful for you is: http://drupal.org/node/131589
Comment #6
drewish commentedi think this has been fixed by some other recent patches. please update and re-open this if it's still not working.