aimeos / aimeos-core

Aimeos PHP e-commerce framework for ultra fast online shops, scalable marketplaces, complex B2B applications and #gigacommerce
https://aimeos.org
Other
3.4k stars 118 forks source link

Previews is not removed after deleting media in the admin #249

Closed zherdev-artem closed 3 years ago

zherdev-artem commented 3 years ago

Hi, in aimeos-laravel 2021.07 previews are not removed after deleting media in the admin.

aimeos commented 3 years ago

Not all, the smallest one is preserved because it's referenced in orders and at other places and that should prevent broken images. Are there any other consequences we've overseen?

zherdev-artem commented 3 years ago

Thank you for the feedback, I got it. Seems that works for any domain, not only for the product. For example, for ai-cms-grapesjs page, I see the same behaviour, and for my custom domains too.

aimeos commented 3 years ago

That's true, it's not limited to products but it's only necessary for that domain. If you create a PR changing the behaviour here, we are happy to merge it: https://github.com/aimeos/aimeos-core/blob/master/controller/common/src/Controller/Common/Media/Standard.php#L388-L389

zherdev-artem commented 3 years ago

I can't promise, and it is not so critical for us right now, maybe later. Anyway, thank you for the answer and link to the code.