Categories
Weirdness WordPress

Image Upload of Same Named File

On a client’s website that sells artwork, I accidentally had 2 images with the same name uploaded to the Media library, call them file1 and file2. Same picture, different names.

All I want to do is upload the correct image into the file named file2, but no matter what I try, WordPress still calls the image I upload file1. Somewhere, somehow, WordPress still has a version of the wrong image and I can’t seem to find it and flush it.

First, I delete file2 from the Media library, then upload it again. It still shows the image from file1.

So I delete file2 from the Media library again. I flush my browser cache and history, and upload it again. It still shows the image from file1.

So I delete file2 from the Media library again, flush my browser cache and history, logout from WordPress and close the browser. Restart the browser, log back in, try it again, and it STILL shows the image from file1.

So I delete file2 from the Media library again, flush my browser cache and history, logout from WordPress and close the browser. Then I look at the web server file system with FTP, and it still shows one of the thumbnail versions of file2 still exists. I delete it from FTP. Restart the browser, log back in, try it again, and it STILL shows the image from file1.

WordPress is rat-holing image files somewhere!

So I delete file2 from the Media library again, flush my browser cache and history, logout from WordPress and close the browser. I check the /uploads folder with FTP and find no occurrences of ‘file2.’

So used ran searchreplacedb2.php on the site, changing ‘file2’ to ‘junkname’. It found and changed 2 occurrences!

What the heck is going on?

Just so I could continue with my project, I used a different name for file2. But why can’t I get rid of incorrect versions of image files and use the same name again later?

UPDATE: 3/2/2015

I guess it wasn’t WordPress per se, but rather WP eCommerce. I got tired of other problems with WP eCommerce and switched to WooCommerce. So far this appears to be a smart move. WooCommerce works much better, and the image file upload problem that spawned this post doesn’t happen with WooCommerce.

A side note:

WP eCommerce doesn’t clean up after itself very well either. After uninstall, it left many database tables and files in my theme folder.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Help thwart spambots * Time limit is exhausted. Please reload CAPTCHA.