Skip to content

Duplicating product copies product images couple of hundred times #9466

Closed
@qbixx

Description

@qbixx

When duplicating a product to create a similar product all the required information is copied over. This also includes the product images. However when saving the new (duplicated) product, it takes quite a long time before the product get's saved. This is because the attached images are copied a few hundred times on the server.

The amount of copies is not always the same but ranges from about 200 to 2000 copies. The copies are all in the same folder that the original images resides and will have a format of e.g. [image]_100.jpg.

Preconditions

I've tested this both on Magento 2.1.4 and 2.1.6.
PHP 7.0.18 and MariaDB 10.1.22

Steps to reproduce

  1. Create a new product and fill out the required fields. Also add an image
  2. Save the product and click on the right side on 'Save & Duplicate'
  3. Save the duplicated product
  4. Open original product, 'Save & Duplicate' it.

Expected result

The image(s) on the duplicated product should be copied once.

Actual result

The image(s) on the duplicated product are copied multiple times.

Metadata

Metadata

Labels

Component: CatalogFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasedistributed-cd

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions