Deletion of Image Gallery leave images and folders behind

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
7/15/2012 12:50:26 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Deletion of Image Gallery leave images and folders behind

When deleting an Image Gallery feature (using the Content Manager, i.e. really deleting it) the folders and images it contained are left on the server, e.g.

/wwwroot/Data/Sites/1/media/GalleryImages/95

Since these folders and images are not user-managed, shouldn't these be deleted when the feature that created/managed them is deleted?

7/15/2012 11:26:50 AM
Gravatar
Total Posts 18439

Re: Deletion of Image Gallery leave images and folders behind

I will implement support for deleting the files but the default behavior will remain, you will need to add a config setting to make it delete all the images when an image gallery instance is deleted.

My thinking is that people may have subsequently used the gallery images in other content since they can browse to anything below the media folder from the wysiwyg editor and we have no way of knowing whether any of the images have been used in other content. If we delete it by default then someone will report a bug because an image disappeared from their content and they will be mad at me because they cannot recover it.

On can delete them from file manager or ftp already and I prefer to err on the side of not deleting things in case someone makes a mistake.

So if you prefer the images to be deleted by default, add this to your user.config and it will work after the next release of mojoPortal:

<add key="ImageGallery:DeleteImagesWhenModuleIsDeleted" value="true" />

Best,

Joe

7/16/2012 1:50:36 AM
Gravatar
Total Posts 537
feet planted firmly on the ground

Re: Deletion of Image Gallery leave images and folders behind

Thanks Joe.  You're right of course that this can be looked after with FTP etc, but it's not obvious which of the folders might relate to any particular image gallery (e.g. /wwwroot/Data/Sites/1/media/GalleryImages/95).

Is there any way to deduce this at present? If not, could this be added as a read-only visible property of the feature instance or something, so that admins can know for sure where the images associated with a particular gallery reside?

7/16/2012 8:44:45 AM
Gravatar
Total Posts 2253

Re: Deletion of Image Gallery leave images and folders behind

Hi Crispin,

Not entirely a bad idea to have the module ID shown somewhere. Preferably on the "settings" page for a module (ModuleSettings.aspx). Without this, you can still figure out the module ID by looking for the mid= in the url on the ModuleSettings.aspx page.

HTH,
Joe D.

You must sign in to post in the forums. This thread is closed to new posts.