magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.57k stars 9.32k forks source link

Deleting/ adding images from/to Product Image gallery does not update the database position value #39050

Open Swannyj opened 3 months ago

Swannyj commented 3 months ago

Preconditions and environment

SELECT * FROM catalog_product_entity_media_gallery_value cpem INNER JOIN catalog_product_entity cpe ON cpe.entity_id = cpem.entity_id WHERE cpe.entity_id = <entity_id>;

Steps to reproduce

This also does not work if I was to add a new image. The new image would have the last position value + 1 and will not update all position values

Expected result

The database value for position should update based on the new positions in the image gallery array

Actual result

The position value does not get updated after product save.

Additional information

It is worth noting that re-ordering the images updates this position value.

Release note

No response

Triage and priority

m2-assistant[bot] commented 3 months ago

Hi @Swannyj. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 3 months ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 3 months ago

Hi @Swannyj,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Screenshot 2024-08-16 at 11 45 00 Screenshot 2024-08-16 at 11 47 49

The position didn't get updated after deleting and image.

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 3 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12770 is successfully created for this GitHub issue.

m2-assistant[bot] commented 3 months ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.