Skip to content

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

@Swannyj

Description

@Swannyj

Preconditions and environment

  • Magento version 2.4.6-p6
  • SQL query used to confirm bug

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

  • Add 4 images to the image gallery located within a product
    image
    image

  • Save

  • Delete an image (do not re-order anything)
    image

  • Save
    image

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

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

Labels

Area: CatalogComponent: ImageIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: PR in progressReported on 2.4.6-p6Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions