Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing additional_images does not remove old images in csv import (Images not getting replaced) #33031

Open
4 tasks
duckchip opened this issue May 18, 2021 · 17 comments
Labels
Area: Catalog Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reproduced on 2.4.2

Comments

@duckchip
Copy link
Contributor

duckchip commented May 18, 2021

Preconditions (*)

Trying to update a product with a different set of additional images does not remove old images.

  1. 2.4.2-p1

Steps to reproduce (*)

  1. Create a csv file with 1 product, add the additional_images column with a path to an image in the var/import/images folder
  2. Import the csv file using add/update profile
  3. Navigate to the product edit page and confirm the image is available in the Images section of the page.
  4. Update the csv file with a different value for the additional_images column
  5. Import again
  6. Go back to the product edit page and open the Images section.

Expected result (*)

  1. The new image is added and the old image is removed

Actual result (*)

  1. The new image is added but the old image still exists.

I thought that #26713 would have fixed the issue but the issue still exists. According to #14398 (comment) the issue should have been fixed in 2.4.2

This issue can also be reproduced on 2.3.6 and above.


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • [x ] 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”.
@m2-assistant
Copy link

m2-assistant bot commented May 18, 2021

Hi @duckchip. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-assistant
Copy link

m2-assistant bot commented May 19, 2021

Hi @engcom-Golf. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Golf engcom-Golf added Reproduced on 2.4.2 Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jun 1, 2021
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Golf
Thank you for verifying the issue. Based on the provided information internal tickets MC-42519 were created

Issue Available: @engcom-Golf, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@engcom-Golf engcom-Golf added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Jun 16, 2021
@zhulak
Copy link

zhulak commented Aug 16, 2021

This has been the default behaviour for quite some time. The PR you are referring to will not create duplicates if the images have the same name defined in the CSV import. If the images have different names, they will be added to the product.

One solution would be adding a column to the CSV import which Magento can read during import and decide if existing images should be removed or just added to, e.g. image_behaviour.

If value in the CSV for that row is "replace", then all existing images would be replaced.
Default value would be to add.

@m2-community-project m2-community-project bot removed the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Aug 20, 2021
@Cloudy777
Copy link

The commits somehow got lost or got refactored in in the develop branch.
912b3f7
_removeOldMediaGalleryItems f.e. doesn't exist anymore in the 2.4.3 branch and i can't find another solution for that.

@hostep
Copy link
Contributor

hostep commented Aug 30, 2021

@Cloudy777, see d4931f79648, both the commit you mentioned as this one are part of #26713

Not sure if this is helpful?

@Cloudy777
Copy link

@hostsep Exactly in your commit _removeOldMediaGalleryItems was removed. Therefore the functionality of removing images by csv import doesn't remove old images anymore, right?
Only the duplicate image hash function is present

@hostep
Copy link
Contributor

hostep commented Sep 2, 2021

Could be. But that method also didn't exist before the PR.

If you do want that behavior, feel free to send in another PR with your suggestion 🙂

@engcom-Lima
Copy link
Contributor

I have re-evaluated this issue and verified the same. Issue is reproducible on 2.4-develop.

@sdzhepa sdzhepa added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Sep 23, 2021
@engcom-Alfa
Copy link
Contributor

A couple of exercises have been done below

  1. Exported the product that is having a few images already.
    Replaced one image from the additional images column of the csv file, and re imported keeping add/update import mode.
    Noticed that the old image is still existing and the newly replaced image is also getting listed in the products images section.

  2. Exported the product that is having a few images already.
    Replaced one image from the additional images column of the csv file, and re imported keeping replace import mode (but made some additional columns data empty)
    Noticed that complete product data is getting erased and newly replaced with imported data.

Hence there is a conflict in accepting it as a bug, and so waiting for PO confirmation on this!

Thanks

@ciprianmariuta
Copy link

@magento I'm working on it

@m2-assistant
Copy link

m2-assistant bot commented Oct 7, 2021

Hi @ciprianmariuta! 👋
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team command to join Contributors team.

@ciprianmariuta
Copy link

@magento add to contributors team

@m2-assistant
Copy link

m2-assistant bot commented Oct 7, 2021

Hi @ciprianmariuta! 👋
Thank you for joining. Please accept team invitation 👉 here 👈 and add your comment one more time.

@ciprianmariuta
Copy link

@magento I'm working on it

@engcom-Delta
Copy link
Contributor

Hi @duckchip ,

Thanks for your reporting and collaboration.
We have re-verified the issue in latest 2.4-develop instance and the issue is reproducible.
Kindly refer the screenshots.

Steps to reproduce

  1. Create a csv file with 1 product, add the additional_images column with a path to an image in the var/import/images folder
  2. Import the csv file using add/update profile
  3. Navigate to the product edit page and confirm the image is available in the Images section of the page.
  4. Update the csv file with a different value for the additional_images column
  5. Import again
  6. Go back to the product edit page and open the Images section.
  7. Observe, The new image is added but the old image still exists.
    image

Thanks.

@engcom-Delta engcom-Delta added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Component: Catalog Area: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: On Hold Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Catalog labels Nov 5, 2024
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-927

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Catalog Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Reproduced on 2.4.2
Projects
None yet
Development

No branches or pull requests