BetterCMS icon indicating copy to clipboard operation
BetterCMS copied to clipboard

When deleting media folder, delete all it's files and subfolders with files and move files to trash folder.

Open Audrunas opened this issue 12 years ago • 9 comments

Depends on #274. Move all folder and subfolders files to trash folder and mark subfolders and files as deleted

Audrunas avatar Feb 20 '13 07:02 Audrunas

Could be done in RC1.

Audrunas avatar Feb 20 '13 07:02 Audrunas

Update release notes when done.

Audrunas avatar Jul 31 '13 06:07 Audrunas

Sub-medias deleting added. Affects #495.

ghost avatar Jul 31 '13 07:07 ghost

Fixed in 1.10.3+

JuliusSenkus avatar Jul 20 '15 11:07 JuliusSenkus

  1. It is not possible to delete image folder (no matter empty or not) Steps: Create new folder (no matter images or files) -> try to delete it: error
  2. It is not possible to delete image if it was renamed using "Rename" function called from menu. Steps: upload image -> right mouse click on this image in the list -> rename -> rename it, save -> choose to delete it: error. If renaming is done in image edit modal, delete works ok.

daivabrazukaite avatar Aug 26 '15 16:08 daivabrazukaite

Fix available from 1.10.4-beta3+

JuliusSenkus avatar Aug 31 '15 03:08 JuliusSenkus

Fix available from 1.11.0-beta10+

ghost avatar Nov 24 '15 13:11 ghost

Upload image-> open it for edit -> save: new image versions with new urls will be created (ok). Delete image: only current version images will be moved to trash, but history images - won't (exception in logs will be logged, MediaFiles.isMovedToTrash will be = 0, nextTry timestamp will be set). Also same exists with files. Issue doesn't exist if new version is created using re-upload as in this case urls are formed differently.

Example with one of images exception in logs: 2015-11-26 11:38:32.7371 Failed to move file with Id=35c93ceb-f8ee-4f6f-910d-a55c00bed23d. Failed to copy object. SourceUrl: http://bettercms.blob.core.windows.net/bettercmsstaging/image/8b1ce7e5b10f4fe3a531868fd7e239c0/o_a113aa10d5c64afc93cbf5cedce377d0.jpg, DestinationUrl: http://bettercms.blob.core.windows.net/bettercmsstaging/trash/image/8b1ce7e5b10f4fe3a531868fd7e239c0/o_a113aa10d5c64afc93cbf5cedce377d0.jpg BetterCms.Core.Exceptions.Service.StorageException: Failed to copy object. SourceUrl: http://bettercms.blob.core.windows.net/bettercmsstaging/image/8b1ce7e5b10f4fe3a531868fd7e239c0/o_a113aa10d5c64afc93cbf5cedce377d0.jpg, DestinationUrl: http://bettercms.blob.core.windows.net/bettercmsstaging/trash/image/8b1ce7e5b10f4fe3a531868fd7e239c0/o_a113aa10d5c64afc93cbf5cedce377d0.jpg ---> Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse() at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase1 cmd, IRetryPolicy policy, OperationContext operationContext) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase1 cmd, IRetryPolicy policy, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.StartCopyFromBlob(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext) at BetterCms.Module.WindowsAzureStorage.WindowsAzureStorageService.CopyObject(Uri sourceUri, Uri destinationUri) --- End of inner exception stack trace --- at BetterCms.Module.WindowsAzureStorage.WindowsAzureStorageService.CopyObject(Uri sourceUri, Uri destinationUri) at BetterCms.Module.MediaManager.Services.DefaultMediaFileService.MoveToTrash(ISession session, MediaFile fileToMove, String serverUrl) The remote server returned an error: (404) Not Found. Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (404) Not Found. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. at System.Net.HttpWebRequest.GetResponse() at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase1 cmd, IRetryPolicy policy, OperationContext operationContext) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](StorageCommandBase1 cmd, IRetryPolicy policy, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob.StartCopyFromBlob(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext) at BetterCms.Module.WindowsAzureStorage.WindowsAzureStorageService.CopyObject(Uri sourceUri, Uri destinationUri) Request Information RequestID:5ace7597-0001-005d-3e3e-28c317000000 RequestDate:Thu, 26 Nov 2015 11:38:31 GMT StatusMessage:The specified blob does not exist. ErrorCode:BlobNotFound

daivabrazukaite avatar Nov 26 '15 12:11 daivabrazukaite

Fix after #1055

ghost avatar Dec 22 '15 13:12 ghost