VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: nordmograph on October 05, 2014, 11:37:23 AM

Title: VM2.9.9e - Deleting product via the Backend doesn't remove its pictures
Post by: nordmograph on October 05, 2014, 11:37:23 AM
Hello

Removing a product via the Backend doesn't remove its pictures
(both in product and resized folders).
Also:
Entry for the picture, is removed from #__virtuemart_product_media is removed, but still in #__virtuemart_media.

Also a Notice comes up:

Notice: Undefined index: remove in C:\wamp\www\vm3test\administrator\templates\isis\html\layouts\joomla\system\message.php on line 20 Call Stack #TimeMemoryFunctionLocation 10.0003257792{main}( )..\index.php:0 20.03033374832JApplicationCms->execute( )..\index.php:42 30.260318974800JApplicationAdministrator->render( )..\cms.php:257 40.260418975720JApplicationCms->render( )..\administrator.php:436 50.269219289360JDocumentHTML->render( )..\cms.php:988 60.269219289384JDocumentHTML->_renderTemplate( )..\html.php:474 70.434720089032JDocumentHTML->getBuffer( )..\html.php:696 80.435220104224JDocumentRendererMessage->render( )..\html.php:408 90.435520111776JLayoutHelper::render( )..\message.php:57 100.435720113968JLayoutFile->render( )..\helper.php:50 110.437220140032include( 'C:\wamp\www\vm3test\administrator\templates\isis\html\layouts\joomla\system\message.php' )..\file.php:97 ">
remove
Product successfully deleted.

Title: Re: VM2.9.9e - Deleting product via the Backend doesn't remove its pictures
Post by: bluezeyes on October 06, 2014, 01:22:41 AM
Hi, why should deleting a product deleting the associated product pictures too?
It would be a nice opt-in feature in deletion process,  but for some reasons not a good idea:

-All products could be marked accidentally before pressing delete,  so all pictures would be deleted too,  when associated.

-Pictures could be reused on other products (f.e a sample picture of a metal ladder) too,  there would be a huge load to find all occurrences to be sure that a picture is not used somewhere else, or if not searching,  there would be broken pictures instead..

Kind regards...
Title: Re: VM2.9.9e - Deleting product via the Backend doesn't remove its pictures
Post by: nordmograph on October 06, 2014, 01:34:30 AM
Hi,

Well when adding a new product you're not able to browse existing pictures.
In this condition, orphan pictures from deleted products are useless.
Title: Re: VM2.9.9e - Deleting product via the Backend doesn't remove its pictures
Post by: Milbo on October 06, 2014, 10:53:09 AM
Bluezeyes, exactly. The reason we think it is better to add more options to the media view.

and since when we cannot browse existing pictures? Nordmograph? It is a fundamental basic function that you can do it, maybe you never tried to search respectivly entered a space.

Title: Re: VM2.9.9e - Deleting product via the Backend doesn't remove its pictures
Post by: nordmograph on October 06, 2014, 11:04:30 AM
OK right I get it. Sorry, it was too late when I posted. I forgot about the media manager and only thought of the media uploader at the product details page. This makes sense. Consider this as solved .