Creating a copy of a product based on a previous copy is not saved
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- РоманАндрейчук
- Posts: 18
- Joined: 13 Jan 2022, 15:08
Creating a copy of a product based on a previous copy is not saved
Environment
Version (e.g. 2021.10)
Integration (Laravel)
System (Linux, Mac)
Hello!
I have a problem with creating new products. Creating a copy of a product based on a previous copy is not saved.
The logs show the following error:
Couldn't copy file from "1.d/files/4/9/49381151_1-d-files-1-8-1820bf6f_1-d-files-3-7-37efe3a7_1-d-files-2-b-2b6bfefb_1-d-files-c-0-c00e8e37_1-d-files-1-5-15233870_1-d-files-c-b-cb126af9_1-d-files-e-d-ed0388bf_1-d-files-c-7-c75e5b55_1-d-files-9-9-9922243e_2022-07-04_20-36-01.jpg" to "1.d/files/4/b/4ba47f99_1-d-files-4-9-49381151_1-d-files-1-8-1820bf6f_1-d-files-3-7-37efe3a7_1-d-files-2-b-2b6bfefb_1-d-files-c-0-c00e8e37_1-d-files-1-5-15233870_1-d-files-c-b-cb126af9_1-d-files-e-d-ed0388bf_1-d-files-c-7-c75e5b55_1-d-files-9-9-9922243e_2022-07-04_20-36-01.jpg"
It looks like the problem is with the long filename. How to change the pattern of the new image filename when copying a product?
Version (e.g. 2021.10)
Integration (Laravel)
System (Linux, Mac)
Hello!
I have a problem with creating new products. Creating a copy of a product based on a previous copy is not saved.
The logs show the following error:
Couldn't copy file from "1.d/files/4/9/49381151_1-d-files-1-8-1820bf6f_1-d-files-3-7-37efe3a7_1-d-files-2-b-2b6bfefb_1-d-files-c-0-c00e8e37_1-d-files-1-5-15233870_1-d-files-c-b-cb126af9_1-d-files-e-d-ed0388bf_1-d-files-c-7-c75e5b55_1-d-files-9-9-9922243e_2022-07-04_20-36-01.jpg" to "1.d/files/4/b/4ba47f99_1-d-files-4-9-49381151_1-d-files-1-8-1820bf6f_1-d-files-3-7-37efe3a7_1-d-files-2-b-2b6bfefb_1-d-files-c-0-c00e8e37_1-d-files-1-5-15233870_1-d-files-c-b-cb126af9_1-d-files-e-d-ed0388bf_1-d-files-c-7-c75e5b55_1-d-files-9-9-9922243e_2022-07-04_20-36-01.jpg"
It looks like the problem is with the long filename. How to change the pattern of the new image filename when copying a product?
Re: Creating a copy of a product based on a previous copy is not saved
We've changed the code and remove the first parts now before copying the file. The change is available if you execute:
Can you test and confirm that it works now?
Code: Select all
composer req aimeos/aimeos-core:2021.10.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- РоманАндрейчук
- Posts: 18
- Joined: 13 Jan 2022, 15:08
Re: Creating a copy of a product based on a previous copy is not saved
No, the problem is reoccurring. Here is a list of paths in the new product chain.
http://magic.com.test/aimeos/1.d/previe ... n-2014.jpg
http://magic.com.test/aimeos/1.d/previe ... n-2014.jpg
http://magic.com.test/aimeos/1.d/previe ... n-2014.jpg
http://magic.com.test/aimeos/1.d/previe ... n-2014.jpg
http://magic.com.test/aimeos/1.d/previe ... n-2014.jpg
http://magic.com.test/aimeos/1.d/previe ... n-2014.jpg
Re: Creating a copy of a product based on a previous copy is not saved
The new code does NOT remove existing prefixes added in previous copy actions. Please test with a product that doesn't already have long image URLs and check that copying that product recursively does only add nine characters of a hash and the total length of the URL doesn't grow after the second copy action any more.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

- РоманАндрейчук
- Posts: 18
- Joined: 13 Jan 2022, 15:08
Re: Creating a copy of a product based on a previous copy is not saved
Hello.
This example was made based on a new product in a dev release
This example was made based on a new product in a dev release
Re: Creating a copy of a product based on a previous copy is not saved
Unable to reproduce the issue when using aimeos/ai-admin-jqadm 2021.10.18+ or dev-master
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
