When a new node is created and you upload an image with an already existing filename in another node, after uploading and before saving, the old filefield_thumbnail is displayed in the browser (this is NOT a browser caching problem).
I use these modules:
FileField 6.x-3.0-rc1
ImageField 6.x-3.0-rc1
FileField Paths 6.x-1.0
Images are uploaded to node-type 'objects' using filefield_paths and this path:
/web/sites/default/files/imagefield_thumbs/objects/[nid]/
Here's how you can recreate this:
1. setup a content type 'objects'
2. add a cck imagefield and setup the path like above
3. number of images is unlimited in my case
4. I also use transilaterion and to lowercase in the settings.
5. create a node and upload an image 'test123.jpg'
6. save
7. create another node and upload a different image with the same name 'test123.jpg'.
Now you will see the thumbnail of the image in the first node, which would be located in .../objects/[nid]/test123.jpg
You can check the image path here to verify this.
Next, if you save the node and edit - you will see the right picture. (because then its moved to the right folder)
I think the image should get renamed to 'test123_0.jpg' in step 7 but isn't? This renaming only seems to occur when you upload the duplicately named images in the same node.
Comments
Comment #1
quicksketchDoes this problem occur without node-based path names? I think this might be an issue in FileField Paths, not FileField or ImageField modules.
Comment #2
askibinski commentedI don't think this is caused bij filefield_paths. The issue occurs before te file is saved at the path defined by filefield_paths.
Comment #3
quicksketchRight, that's what I'm saying. If you don't use node-based path names (say you have the upload path "uploads" or something static), then this problem doesn't exist. The file is uploaded directly to its final location, and renamed appropriately. If this problem doesn't exist with non-node based paths, it's a bug in FileField Paths, not FileField or ImageField.
Comment #4
askibinski commentedYou're right. This issue doesn't occur when filefield_paths aren't used. (just tested)
Moving this to filefield_paths issues.
Comment #5
askibinski commentedI can't seem to recreate it anymore using the new version released today.
I guess it is fixed in 6.x-1.1?
Comment #6
decipheredYes, this was a known issue with 6.x-1.0 and support for ImageField, it was been fixed in 6.x-1.1.
Cheers,
Deciphered.