Media's conflict when copying entries

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
HADA
Posts: 5
Joined: 13 Apr 2021, 15:46

Media's conflict when copying entries

Post by HADA » 26 Oct 2021, 13:46

Aimeos : 2021.07.4
Laravel 8

Hello Aimeos, thank you again for your efforts.

I found a weird behaviour when copying a entire entry from the admin panel :

For products for example, let's say a product A has a media "Media1.jpg", when duplactating the Product A to create a new Product (let's call it "Product B"), if i change the product B media before saving (to have "Media2.jpg" for example), and then save, Media1.jpg is deleted from the filesystem. That always leads to loose images on the initial product (whose entries should be copied )

I guess it has something to do with and unhandled case in the media controller here :

Code: Select all

if( $path && $fs->has( $path ) ) {
			$fs->rm( $path );
		}
When duplacting a product, and before saving it, the path still refers to the initial product media.

Thank you in advance

User avatar
aimeos
Administrator
Posts: 7918
Joined: 01 Jan 1970, 00:00

Re: Media's conflict when copying entries

Post by aimeos » 27 Oct 2021, 10:57

Thank you for your issue report. The problem is now fixed in aimeos/ai-admin-jqadm:2021.10.x-dev.
You need to update to 2021.10 LTS because 2021.07.x isn't supported any more.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

HADA
Posts: 5
Joined: 13 Apr 2021, 15:46

Re: Media's conflict when copying entries

Post by HADA » 29 Oct 2021, 08:20

aimeos wrote: 27 Oct 2021, 10:57 Thank you for your issue report. The problem is now fixed in aimeos/ai-admin-jqadm:2021.10.x-dev.
You need to update to 2021.10 LTS because 2021.07.x isn't supported any more.
Noted, thank you !

Post Reply