Active
Project:
Upload Image
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Mar 2007 at 22:07 UTC
Updated:
10 Feb 2011 at 21:33 UTC
Get this message after installing the module on Drupal 5.
The scenario: Install module, activate, add file to post, edit post . . . error as below:
The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename
also, when you look at the path to the image, it is missing the file name. as below . . .
This file can be found at http://drupal5/files/.
So, have I messed something up, or is this a bug?
Comments
Comment #1
drewish commentedit might be a bug with the image module. you should make sure you can create image nodes without using the upload_image module.
Comment #2
t4him commentedThanks drewish,
I am working with a fresh install of D.5.1 from 03/28/07. A fresh install of image and upload as well. If I disable the upload module it works fine. If I disable it, I get the error.
Can i give you any more info that might help here.
Comment #3
dsnydernc commentedthis is a known issue with image module. if you check the image module issue section you will see a patch, though it doesn't fully fix it.
Comment #4
t4him commentedThanks slidenby,
I have performed the patch AND downloaded the latest version of image module. Both seem to continue to produce the same results. The image filename is simply getting lost. I am currently looking at a way to abandon the image module. It simply is not stable and it should be. The image module for 4.7.x seemed to stay in a more stable state, but as more and more additions are made for 5.x, it seems there is a learning curve here for module development.
I was just trying to write up a new "recipe" to manage images and produce a slideshow with predictable results. My current thinking is using imagecache and views to produce the slides. If you set views to display as a "list" and only one image per page, it works. My current problem now is that imagecache deals with the images in a slightly different way when resizing., Anyway, that was way off subject.
Thanks for the response, I will continue to monitor this section for solutions that produce a stable image module. Until it is stable, I cannot use it.
Comment #5
dsnydernc commentedI'm glad to hear you're thinking about getting away from the image module - the image module has so much potential, but just never seems to manage to live up to it. Though I'm pretty well stuck in with the image module now, having had been using for months and patching all along the way. It now works as I need it to, and with the addition of your module I've more or less built my whole site around the two (a image forum site).
I look forward to seeing what you come up with in the future. It is nice to see module developers coming up with alternative image solutions.
Comment #6
drewish commentedt4him, sorry your not happy with the image module but i haven't seen you posting bug reports in its issue queue. i got added as a maintainer a few weeks back and i've committed a ton of bug fixes and closed over 100 bug and support requests. it may not be the right tool for you but it's gotten a lot more stable recently.
Comment #7
t4him commenteddrewish,
Thanks for the , have you tried a "fresh" install and then performed an import? I am not a module developer. The recipe I was speaking of was in reference to "another" way to create what I need for this project. The problem is with Drupal 5.x / image module and import image. I get the error, and apperently other are too. I did look through the issues that have been posted, this is why I did not issue a bug, It had already been issued. At the bottom of that bug, it was closed and said that the patch had been committed to head. I still have the problem.
I am not trying to create a rift, just trying to get a job done. If I have to wait, I have to wait. I am patient because I am not a programmer and rely on others to get it right. I guess my contribution is to report back when I have an issue. I was just wanting to know if there was a "solid" fix in place yet? So, is this considered fixed?
Comment #8
ericpughthe same error, except it comes up when uploading audio. (audio module)
"The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename."
The funny thing is that the uploaded audio is present and playable even though something triggered the error message. ??
Comment #9
Christefano-oldaccount commentedPlease do not change the title and make it less descriptive. Comments in project issue queues work differently than comments in the forum.
Comment #10
brahms commentedI'm sorry, but I think the problem is a bug in the Upload Image module and not in the Image module. I use following modules:
Download method is set to public and I am also using the default file system path "files".
I create a new node and attach an image "abc.jpg" to it using the core upload module. When I push the submit button, first the attached image is saved as "files/abc.jpg" by the upload module and an entry is written to the files table. In this entry the filepath column has the value "files/abc.jpg". After that Drupal calls the upload_image_nodeapi of the upload image module. Here the function "upload_image_save" is called and this creates a new image node and the original image "files/abc.jpg" gets saved as "files/images/abc.jpg". The original image "files/abc.jpg" gets lost but the entry for it in the "files" table still shows the filepath "files/abc.jpg" instead of "files/images/abc.jpg"! This is the reason, why you see the error saying "The selected file could not be copied, because no file by that name exists. Please check that you supplied the correct filename". I think the "upload image" module should update the entry in the files table setting the filepath to the right path inside the image path of the image module. (You can try setting this with SQL and the error message is gone).
If you add following code in file upload_image.module (revision 1.17.2.6), between lines 198 and 199 in function upload_image_save, the entries in files table get the right filepath:
Here is the code from line 198 to line 200, line 199 is the bugfix:
Comment #11
giorgio79 commentedGetting this error message as well, but I use CCK imagefield and imagecache...
Comment #12
killes@www.drop.org commentedmarked #236251: Incongruent filepaths between upload and image upload modules as duplicate.
Applied a fix to the D6-dev branch
Comment #14
jessia commentedI see this issue has been closed for a while, but I'm encountering this error with Drupal 6.13 and 6.x-1.x-dev using Import Image.
The node is created, but no image is displayed. When I go to edit the node, the path to the image is blank.
The funny thing is, I was successfully using Import Image to upload images a week ago, and now I can't. I tried to import a few hundred images, and they all failed in this way.
Any help would be appreciated.
Comment #15
salvisFWIW, I'm seeing the same error with img_assist...
The message is from file_copy().
Comment #16
salvisActually, my occurrence was caused by the Rules module.
see #639918: Node save triggers "The selected file could not be copied, because no file by that name exists." error.
Comment #17
Hobbes-2 commentedsubscribe
Comment #18
luf commentedWindows 2008 Server + IIS7 Users who receive this error:
I receieved this error plenty of times when trying to upload files or use ImageCache module to create thumbnails which showed up as red X's instead of pictures.
Go to your drupal site > Site Configuration > File System >
Your Temporary Path might be: C:\Windows\temp or something similar
If you receive the "file could not be copied" error, it is likely your permissions are not allowing a write to that file.
* TO FIX THIS ERROR *
1. Create a 'temp' folder in your drupal/sites/default/files/ directory
[edit- this was a 1. also lol]2. Change your Site Configuration > File System > Temporary Directory to: C:\inetpub\wwwroot\YOURSITE\sites\default\files\temp
3. Done.
If you do not use Windows Server 2008, IIS7, or do not have direct dedicated remote acces, you may be able to replace Step 1: C:\inetpub\wwwroot\etc etc.. with: sites\default\files\temp or any other writable folder source.
Enjoy.
Comment #19
jordan.schmitt commentedThanks for the assist. Luf's solution above worked like a champ for me.
Comment #20
phpaddict commented^^+1 It works for me as well. Thanks Luf.
Comment #21
phpaddict commentedLuf, if you don't mind me asking, why is that happen? Is it because image module has no access right over windows' temp directory?
Comment #22
celestialkiddy commentedMaybe you will be able to help since your setup is similar to mine, and we had the same probelm.
I finally got my image to upload following the steps above without any errors, and it is in the folder it should be after uploading - C:\inetpub\wwwroot\YOURSITE\sites\default\files\pictures
but I'm still getting just a red X for a picture...
nevermind I found a fix elsewhere!
What I needed to do was go to admin/settings/file-system and set the download method to private
Comment #23
Jsan2020 commentedThanks luf, your fix worked for me too.
Comment #24
salvis@luv: Please don't falsify history by editing your old comments. Append a new comment instead.
All third-party comments after #18 are now obsolete because you changed your #18 (timestamp!), and we don't know what it was that they said was working for them.
Comment #25
luf commentedi changed a number from 1 to 2, it was reading steps: 1. 1. 3. :P