Replace File Working As Intended?

Permalink
Hey guys,

I've noticed a few times now that when I replace an image in the file manager, it still seems to keep the old file on disk and any references to that image remain intact (that is, the image isn't updated around various areas on the site, it doesn't actually get replaced).

Does anyone know if this is intended behavior or is it a bug? It seems like that when you replace a file, it should remove the old one and put the new one in it's place (same directory & filename). Any ideas?

nickelfault
 
nickelfault replied on at Permalink Reply
nickelfault
Hmmm it seems as though it only gets updated when you go into TinyMCE and re-save the block the image is used in.
glockops replied on at Permalink Reply
glockops
You need to clear your concrete5 cache in order to see the new image throughout the site. Blocks typically use the getThumbnail() api call to resize images and will referenced the resized cache file (of the old image) until the individual block is updated or the cache is cleared.
nickelfault replied on at Permalink Reply
nickelfault
Will clearing the cache also remove the old, replaced file? I think that file still sits on the server, and doesn't get physically replaced right? I really think the replace feature should REPLACE the actual file...
glockops replied on at Permalink Reply
glockops
Files managed with concrete5 (including images) also have versioning just like pages. You can "roll-back" to previous versions of any file that is replaced. So no, old files do not get replaced, they remain on the server. I'm not sure if they are permanently deleted if you delete them through file versioning or not.
nickelfault replied on at Permalink Reply
nickelfault
Ohh, thanks for clarifying that!
nickelfault replied on at Permalink Reply
nickelfault
Imma submit this as a bug.
slarcher replied on at Permalink Reply
@nickelfault: This is not a bug. Initially it might seem to but it is not. As @glockops mentioned correctly, Concrete5 comes with versioning. Basically you can re-establish blocks/pages as they were back in history. To be able to do this a file can not be replaced.

I had this issue too initially but clearing cache is all you need to do. Go to Dashboard > Settings > Optimization > Clear Cache. Reload the pages which contain the media you replaced and you see all is sweet.

cheers,
slarcher replied on at Permalink Reply
But what would be a good proposition is that the systems clears the cache automatically after a media replace is done. That would be a good feature indeed!
andrewlisa replied on at Permalink Reply
I think this can be worked on will try it for sure....
<a href="http://www.citizenshipper.com/hot-shot-loads.php">hot shot loads</a>