Created on 2015/10/21 10:20:40 +0000
Votes at time of UserVoice import: 4
Just had a client upload a blog post image to a staging environment rather than production (asset source is local folder), image did not exist on production which killed the homepage on the live website (due to a blog feed on the home page), dev mode set to false, but completely shut everything down, I think this a bit of an over the top for an image that doesn't exist, have you seen anyone else dealt with this in a particular way? After all what happens normally when an image doesn't exist? The entire page still loads, just the image 404s. I feel that's what should happen here. It may do this when using the .url method (I'm not sure at the moment), but in this case a transform is being used to attempt to display the missing image.
I have seen Brad suggested on a stackexchange post that you can only do a file exists check with a plugin, but that would involve quite a bit of work to wrap all images in that check.
I did ask in your #help channel, though was ignored due to another popular question at the same time, and, distaste from other developers as I am using a shared database between environments. Though shared database or not, what if the file was removed from the server by other means? say the client has ftp access? The file is actually corrupt? What if a cron job removes it by mistake? All of these situations probably happen quite often.
I have addressed it by telling the client not to do it in future, though it would be nice to have a silent fail on something like this.
Suggested solution:
Link to the the file that doesn't exist instead of attempting a transform on it, so a 404 will present itself, or, load in a generic (client friendly) placeholder Especially when dev mode = false.
Just had a client upload a blog post image to a staging environment rather than production (asset source is local folder), image did not exist on production which killed the homepage on the live website (due to a blog feed on the home page), dev mode set to false, but completely shut everything down, I think this a bit of an over the top for an image that doesn't exist, have you seen anyone else dealt with this in a particular way? After all what happens normally when an image doesn't exist? The entire page still loads, just the image 404s. I feel that's what should happen here. It may do this when using the .url method (I'm not sure at the moment), but in this case a transform is being used to attempt to display the missing image.
I have seen Brad suggested on a stackexchange post that you can only do a file exists check with a plugin, but that would involve quite a bit of work to wrap all images in that check.
I did ask in your #help channel, though was ignored due to another popular question at the same time, and, distaste from other developers as I am using a shared database between environments. Though shared database or not, what if the file was removed from the server by other means? say the client has ftp access? The file is actually corrupt? What if a cron job removes it by mistake? All of these situations probably happen quite often.
I have addressed it by telling the client not to do it in future, though it would be nice to have a silent fail on something like this.
Suggested solution:
Link to the the file that doesn't exist instead of attempting a transform on it, so a 404 will present itself, or, load in a generic (client friendly) placeholder Especially when dev mode = false.