VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: bluesheep on February 14, 2012, 15:43:43 PM

Title: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: bluesheep on February 14, 2012, 15:43:43 PM
Hello Forum

I have noticed thet, when i delete a category or a product image, they are still in the database?

Beste Grüsse
bluesheep
Title: Re: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: Milbo on February 14, 2012, 22:29:03 PM
Do you mean in the xref table? or the in the media?

It is not meant that when you delete a product, that you also delete the media with it... maybe an extra button would help. Same problem is with stuff, which has childs.
Title: Re: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: bluesheep on February 15, 2012, 08:26:29 AM
Wenn man z.B. eine Kategorie "Werkzeug" anlegt und diese wieder löscht, bleibt Sie, wenn man mit phpmyadmin nachschaut, in der DB bestehen. Wenn man nun zu einem späteren Zeitpunkt eine Kategorie "Werkzeug" nochmals erstellt, ist der Slug bereits besetzt und es wird ein "_{DATUM}" angefügt. Sie scheint dann wie in einem Papierkorb zu sein, den es aber nicht gibt. Oder irre ich mich?

Das gleiche bei den Bild Titeln. Die dürfen auch nur einmalig sein und wenn man eines löscht (aus dem Produkt), ist der Titel immer noch besetzt. Das die Bilder nicht von der Platte gelöscht werden, ist nicht so problematisch. Cool wäre, wenn man im Media-Manager die Bilder den Produkten zuordnen könnte, via Patch. So könnte man alle benötigten anwählen und dann mit einem Button einem Produkt zuordnen.

Beste Grüsse
bluesheep
Title: Re: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: archos on February 15, 2012, 08:43:53 AM
In that case it's more a "delete orphan" procedure that we need.
Means delete objects not related to any parent
Title: Re: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: Rolandos on April 21, 2012, 16:30:38 PM
Is it possible when i remove a product all it's media will be deleted too? It is a lot of extra work to delete the product and search the additional media in the product and thumbnail map (+2400 images)
Title: Re: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: agps on August 29, 2013, 17:14:38 PM
Quote from: Rolandos on April 21, 2012, 16:30:38 PM
Is it possible when i remove a product all it's media will be deleted too? It is a lot of extra work to delete the product and search the additional media in the product and thumbnail map (+2400 images)

This functionality will be very useful in large eshops. I have more than 10.000 images.
Title: Re: Bug? Deleted Categories/Product Images/etc. are still in the DB
Post by: anisimow on February 09, 2014, 16:47:20 PM
Quote from: agps on August 29, 2013, 17:14:38 PM
Quote from: Rolandos on April 21, 2012, 16:30:38 PM
Is it possible when i remove a product all it's media will be deleted too? It is a lot of extra work to delete the product and search the additional media in the product and thumbnail map (+2400 images)

This functionality will be very useful in large eshops. I have more than 10.000 images.
For delete product images width check of unused images in another products, I've made some changes. Look at this topic http://forum.virtuemart.net/index.php?topic=107876.0 (http://forum.virtuemart.net/index.php?topic=107876.0) 
I guess normally it or something similar should bee in media model and called in every delete actions.