So we had a really strange issue happen last night on a new client site (Umb 7.15.2).
They were trying to delete a media item from the library, but somehow have managed to delete a folder in the media library named 'images' that they had setup that of course held all their images - over 2k of them!!
However, for some reason these seem to have totally disappeared from the Umbraco instance!!
They aren't in the recycle bin at all. They have literally been deleted. The site is on Azrue so we hold the media in blob storage. And they have been deleted from there.
Looking at the logs we can see that there were ~ 2k transactions at around the time the client deleted the items so clearly this was processing the deletion.
The client also swears blind they didn't right click > delete > go to recycle bin > empty recycle bin.
We still have other previously deleted items in there as well, just none if the 2k images that we are referring too here.
So my questions are:-
Has anyone ever seen this happen before??
Is there some limit on numbers of items that can be moved to the recycle bin so in this instance it was skipped?
Is there something in the Azure File System Object that makes images stored in blob storage skip the recycle bin?
Have we just uncovered a really bizarre Umbraco bug?
Any one with any thoughts or experience around this :)
I've seen it happend with content if you click the delete button twice, it first sends it to the recycle bin and the deletes it.
This was fixed in 7.5 (https://github.com/umbraco/Umbraco-CMS/pull/1432) for the actions menu, but it looks like it's still possible to double click the confirm delete button in the list view
just tested this - i can delete files completely if I start the delete twice (in two browser tabs) I got an SQL error but at the end of it all the images where gone :(
I know this won't help with your current problem, but I've started adding a "Prevent Deletion" checkbox to Media folders and then use an event to cancel any delete or send to recycle bin if it's checked. Can prevent nasty accidents like this.
Seems like we have a root cause and a solution...thanks for the pointers and help!
Maybe we should create an issue to look at this in both V7 and V8 so we can make sure this doesn't happen to anyone else.
For now we have rolled back the DB to before the deletion and the client is gathering all 2k images together so we can reupload them to Azure and wire everything back together again...but this is something that should definitely be addressed in the core.
Bit Stable Door after the horse has gone thing - but I've knocked up a uSync backed "delete protection" class. That will save a media items config and the file before it leaves the recycle bin.
Media skipping recycle bin when deleted
So we had a really strange issue happen last night on a new client site (Umb 7.15.2).
They were trying to delete a media item from the library, but somehow have managed to delete a folder in the media library named 'images' that they had setup that of course held all their images - over 2k of them!!
However, for some reason these seem to have totally disappeared from the Umbraco instance!!
They aren't in the recycle bin at all. They have literally been deleted. The site is on Azrue so we hold the media in blob storage. And they have been deleted from there.
Looking at the logs we can see that there were ~ 2k transactions at around the time the client deleted the items so clearly this was processing the deletion.
The client also swears blind they didn't right click > delete > go to recycle bin > empty recycle bin.
We still have other previously deleted items in there as well, just none if the 2k images that we are referring too here.
So my questions are:-
Any one with any thoughts or experience around this :)
Hi,
Are you 100% sure no one emptied the bin / there isn't a job to do it or anything?
It will be logged if it happened - even if the user doesn't think they did it :(
I've seen it happend with content if you click the delete button twice, it first sends it to the recycle bin and the deletes it.
This was fixed in 7.5 (https://github.com/umbraco/Umbraco-CMS/pull/1432) for the actions menu, but it looks like it's still possible to double click the confirm delete button in the list view
Just to add more details, that's the log from when it happened:
Yeah
just tested this - i can delete files completely if I start the delete twice (in two browser tabs) I got an SQL error but at the end of it all the images where gone :(
Kevin
I know this won't help with your current problem, but I've started adding a "Prevent Deletion" checkbox to Media folders and then use an event to cancel any delete or send to recycle bin if it's checked. Can prevent nasty accidents like this.
Wow, thanks for the responses everyone!!
Seems like we have a root cause and a solution...thanks for the pointers and help!
Maybe we should create an issue to look at this in both V7 and V8 so we can make sure this doesn't happen to anyone else.
For now we have rolled back the DB to before the deletion and the client is gathering all 2k images together so we can reupload them to Azure and wire everything back together again...but this is something that should definitely be addressed in the core.
Cheers
Bit Stable Door after the horse has gone thing - but I've knocked up a uSync backed "delete protection" class. That will save a media items config and the file before it leaves the recycle bin.
https://gist.github.com/KevinJump/06010031797b93a4b22d696b8fb4271c
in theory, you could then put this into a usync folder and it would reimport the media and any config.
but you'd probably want to combine with something like Dan has to stop it happening at all :(
(and that gist doesn't support azure blob storage, so basically it's useless to you.. sorry.)
is working on a reply...