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.53k stars 9.31k forks source link

setting prices in non-default storeviews also splits image attributes #34169

Open IanFiretoys opened 3 years ago

IanFiretoys commented 3 years ago

Preconditions (*)

  1. magento CE 2.4.3
  2. multiple store views in more than 1 store

Steps to reproduce (*)

  1. Open a new product, or a product with no images. image
  2. add an image, and leave the image tags as auto-filled image
  3. save the product
  4. open another storeview
  5. untick the "use default values" for price image
  6. save the product and return to default store view or "All Store Views"
  7. attempt to delete the image you've uploaded with the auto-filled tags image

Expected result (*)

  1. new line in database for the storeview is generated for the price only
  2. image attributes remain only set in default storeview
  3. image is deleted successfully on first try

Actual result (*)

  1. new lines are created for both price and any image tags chosen
  2. image attributes are split off but still related to the image location in multiple stores image
  3. image cannot be deleted with error "The image cannot be removed as it has been assigned to the other image role" image
  4. the lines must then be removed from catalog_product_entity_varchar as there is no "use default values" to re-tick (see issue #29050 )

this is strange that it happens when the price has changed, as it would almost make sense that if you changed something else on entity_varchar that it might create extra rows for other items on entity_varchar, but given that price is on its own table it doesn't make sense. nothing else on entity_varchar seems to be split off for the example product except for "display product options in" in the design section.


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

m2-assistant[bot] commented 3 years ago

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

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


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: 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.

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

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

IanFiretoys commented 3 years ago

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

magento-deployment-service[bot] commented 3 years ago

Hi @IanFiretoys. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 3 years ago

Hi @IanFiretoys, here is your Magento Instance: https://55b48bb2b0ec3ac5da9a86b6cff3ac29-2-4-develop.instances.magento-community.engineering Admin access: https://55b48bb2b0ec3ac5da9a86b6cff3ac29-2-4-develop.instances.magento-community.engineering/admin_f237 Login: 65d9ab91 Password: f3957da0aada

m2-assistant[bot] commented 3 years ago

Hi @engcom-November. 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-November commented 3 years ago

Verified the issue on Magento 2.4-develop branch and the issue is reproducible with above steps performed. And the issue is also reproducible in below scenario as well: Steps to reproduce:

  1. Magento Multi store Setup
  2. Set the Catalog Price Scope to Website and Save
  3. Reindex and clear cache
  4. Admin - Catalog - Products - Create Product - Upload Image, Product visible in all Websites and Save
  5. Change the Scope to other Store view - Uncheck "Use Default Value" for Price field and Save
  6. Change Scope to All Store Views - Delete Image and Save Issue: Below error message is getting displayed. Note: There is no issue while deleting image if "Use Default Value" for Price field is unchecked when scope is set to "All Store Views" image
github-jira-sync-bot commented 3 years ago

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

m2-assistant[bot] commented 3 years ago

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

IanFiretoys commented 3 years ago

I initially thought this might be related to the fact that there are no "use default value" options for these images, so might have been left out of some check when saving in a new storeview, but as this happens to "design > display product options" which does have a use default value checkbox that doesn't make sense.

engcom-Delta commented 2 weeks ago

Hi @IanFiretoys ,

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. Magento Multi store Setup
  2. Set the Catalog Price Scope to Website and Save
  3. Reindex and clear cache
  4. Admin - Catalog - Products - Create Product - Upload Image, Product visible in all Websites and Save
  5. Change the Scope to other Store view - Uncheck "Use Default Value" for Price field and Save
  6. Change Scope to All Store Views - Delete Image and Save Issue: Below error message is getting displayed. image

Note: There is no issue while deleting image if "Use Default Value" for Price field is unchecked when scope is set to "All Store Views"

Thanks.