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

MAGENTO 2.3.5 /V1/products overwrite default values on multi-store site even when only one field is sent to update #31083

Closed
5 tasks
lano-vargas opened this issue Nov 27, 2020 · 25 comments
Assignees
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.3.5 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@lano-vargas
Copy link

lano-vargas commented Nov 27, 2020

Preconditions (*)

  1. V:2.3.5, 2.4-develop
  2. Product API (catalogProductRepositoryV1)

Steps to reproduce (*)

  1. Configure all store view to run under one domain E.G: dev.test.
  2. Set one more Environment apart from default website/store/store view.
  3. E.G: IE
    Screen Shot 2020-11-27 at 19 26 08
  4. Create product on all store view using postman or any other tool:
    URL: rest/all/V1/products
    BODY
{
  "product": {
    "sku": "test-1",
    "name": "Test 1",
    "attribute_set_id": 4,
    "price": 10,
    "status": 1,
    "visibility": 4,
    "type_id": "simple",
    "weight": 100
  },
  "saveOptions": true
}
  1. Update product name for IE store view:
    URL: rest/en-ie/V1/products
    BODY:
{
  "product": {
    "sku": "test-1",
    "name": "Test 1 changed",
  },
  "saveOptions": true
}

Expected result (*)

  1. When API for en-ie is sent I expect only product name changed/updated for that store view

Actual result (*)

  1. Instead all values previously sent for all store view have the checkbox unchecked and populated with the all store view data therefore this values cannot be updated using the all store views again

Screen Shot 2020-11-27 at 19 49 03

Thanks


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

  • 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 Nov 27, 2020

Hi @lano-vargas. 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

@lano-vargas
Copy link
Author

@magento give me 2.3.5 instance

@magento-deployment-service
Copy link

Hi @lano-vargas. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

Hi @lano-vargas, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

@lano-vargas
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @lano-vargas. Thank you for your request. I'm working on Magento instance for you.

@lano-vargas
Copy link
Author

@magento-team The issue however is on 2.3.5 I cannot test REST api USING the instance 2.4 given url:
Screen Shot 2020-11-27 at 20 16 44

Can you confirm if this is a bug please ?

Thanks

@lano-vargas
Copy link
Author

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @lano-vargas. Thank you for your request. I'm working on Magento instance for you.

@lano-vargas
Copy link
Author

@magento I've replicated the issue on 2.4 instance see updated :
Screen Shot 2020-11-28 at 14 51 20
Screen Shot 2020-11-28 at 14 51 12

I would spect only the Product Name checkbox to be unchecked but all store view fields checkbox are unchecked!

@engcom-Delta engcom-Delta self-assigned this Nov 30, 2020
@m2-assistant
Copy link

m2-assistant bot commented Nov 30, 2020

Hi @engcom-Delta. 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.

@lano-vargas
Copy link
Author

Reproduced on 2.4.x

@engcom-Delta engcom-Delta added Reported on 2.3.5 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 30, 2020
@m2-community-project m2-community-project bot moved this from Ready for Confirmation to Confirmed in Issue Confirmation and Triage Board Nov 30, 2020
@magento-engcom-team
Copy link
Contributor

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

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

@sdzhepa sdzhepa added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Nov 30, 2020
@lano-vargas
Copy link
Author

@engcom-Delta possible duplicate #26484

@gabrieldagama gabrieldagama added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. labels Dec 1, 2020
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Dec 1, 2020
@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Jan 13, 2021
@m2-community-project m2-community-project bot moved this from Dev In Progress to Ready for Development in High Priority Backlog Jan 13, 2021
@m2-community-project m2-community-project bot moved this from Dev In Progress to Ready for Development in High Priority Backlog Jan 13, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Jan 15, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog Jan 15, 2021
@m2-community-project m2-community-project bot moved this from Dev In Progress to Pull Request In Progress in High Priority Backlog Jan 15, 2021
@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog Jan 20, 2021
@magento-engcom-team
Copy link
Contributor

Hi @lano-vargas, @zakdma.

Thank you for your report and collaboration!

The related internal Jira ticket MC-39481 was closed as Fixed.

The fix will be available with the upcoming 2.4.3 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Jan 20, 2021
@hostep
Copy link
Contributor

hostep commented Jan 21, 2021

Commits related to MC-39481: https://github.com/magento/magento2/search?q=MC-39481&type=commits

@LiamKarlMitchell
Copy link

Nice thanks :)

@neddy236
Copy link

@hostep After trying the patch (https://github.com/magento/magento2/search?q=MC-39481&type=commits) to 2 magento instances. One 2.4.2 and one 2.3.5-p2 it creates a different problem.

The problem that @lano-vargas said was fixed but a new issue arised.

Let's say you have 1 website and 2 store views again.

You create a product via API and then you try to update the product via API -> PUT @ domain/rest/{{store_code}}/V1/products/{{sku}} and change your locale values like the name. It works great so far.

but then if you try to make another call to the same store view but change only ONE custom attribute, it then ticks off the use default again for all the attributes that were unchecked by the explicit api call that came before this one.

So if you changed the name to be specific to the locale, it gets lost and uses the default value once again.

ex.

{ "product": { "custom_attributes": [ { "attribute_code": "my_attribute", "value": "test_value" } ] } }

@hostep
Copy link
Contributor

hostep commented May 20, 2021

@neddy236: that sounds pretty bad.

Could you please open a new issue for this case? It will get picked up much faster that way.

@neddy236
Copy link

@hostep done. #33052

Imagine updating 20k products in one day in spanish store view for example. Then the next day change a boolean attribute on this products.

You just lost all your spanish product names :)

@leonhelmus
Copy link

leonhelmus commented Feb 8, 2022

This feature now seems to delete my url rewrites :(. If default store has visibility 4 and you try to update a store without adding visibility in the request like this:
[{
"product": {
"sku": "example_sku",
"status": 1,
"attribute_set_id": 11111
}
}]
it will delete your url_rewrites.... If you use the url: https://example.nl/rest/example_nl/async/bulk/V1/products. Because it adds a null value to visibility :(

@leonhelmus
Copy link

Issue is fixed by this commit -> 306f515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.3.5 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Development

Successfully merging a pull request may close this issue.

10 participants