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

[Fixed] Category Update without "name" cannot be saved in scope "all" with REST API #22362

Merged
merged 1 commit into from
Apr 20, 2019

Conversation

niravkrish
Copy link
Contributor

Description (*)

  • Category update API threw error for required field "name".

Fixed Issues (if relevant)

  1. Category Update without "name" cannot be saved in scope "all" with REST API #22309: Category Update without "name" cannot be saved in scope "all" with REST API

Manual testing scenarios (*)

  1. Manual Testing

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 16, 2019

Hi @niravkrish. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

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

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niravkrish why it works on scope "default" without such change and does not work on "all" scope?

@niravkrish
Copy link
Contributor Author

niravkrish commented Apr 16, 2019

@niravkrish why it works on scope "default" without such change and does not work on "all" scope?

Hello @orlangur ,
In this solution the key name is not sent.
If not set in data Body required to update.
So this solution is working fine with all and default as well.

@orlangur
Copy link
Contributor

@niravkrish why "default" scope update works without such change?

We cannot add null as allowed value as proper category name cannot be null.

@niravkrish
Copy link
Contributor Author

niravkrish commented Apr 16, 2019

@niravkrish why "default" scope update works without such change?

We cannot add null as allowed value as proper category name cannot be null.

This can not allow to add or set null value to Category name.
It is used to get Category Name as a string or if not then null.

This is not pass null on save the data to database or anywhere.

If we are not passing the name from request body the name key is set with null before and after applying this solution the key is set when there is name key is available with value.

please let me know for further changes.

Thanks
Nirav Patel

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niravkrish ow, we allow null value for any other getter here.

Still don't get why the bug is in "all" scope only but fix seems reasonable.

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-4771 has been created to process this Pull Request

@soleksii
Copy link

✔️ QA Passed

Before:

before

After:

after

@m2-assistant
Copy link

m2-assistant bot commented Apr 20, 2019

Hi @niravkrish, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants