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

Added improvements to category url key validation logic #27412

Conversation

sergiy-v
Copy link
Contributor

Description

Improved validate URL key logic for category.
Screen Shot 2020-03-24 at 11 20 15 AM
Screen Shot 2020-03-24 at 11 21 30 AM

I have added improvements to validate URL key logic for category instead of adding a solution for Thai language because of:

  • \Magento\Framework\Filter\Translit can not provide translation for Thai language (the convert table does not contain Thai symbols). It will be hard to add and manage all needed symbols for all languages to the convert table.
  • Magento Community Engineering provides on localization extensions like Japanese Localization which provide a solution for such cases (has plugin to filter value in other way).

Fixed Issues

#13689

Manual testing scenarios

See #13689 issue description for details.

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 are green)

@m2-assistant
Copy link

m2-assistant bot commented Mar 24, 2020

Hi @sergiy-v. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

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

@magento-engcom-team magento-engcom-team added Component: CatalogUrlRewrite Release Line: 2.4 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Mar 24, 2020
@sergiy-v sergiy-v requested a review from rogyar March 24, 2020 10:18
@sergiy-v sergiy-v linked an issue Mar 24, 2020 that may be closed by this pull request
Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @sergiy-v,
Your change improves message, however you still will not be able to create category -> it's not fixing the listed issue.

Could you update your changes?

@sergiy-v
Copy link
Contributor Author

sergiy-v commented Mar 24, 2020

Hi @sergiy-v,
Your change improves message, however you still will not be able to create category -> it's not fixing the listed issue.

Could you update your changes?

Hello @ihor-sviziev,
Yes, it's not fixed the issue (not providing translation) as I mentioned in description. I have added the reasons why the logic should not be changed.
I'll be happy to add a solution, but as discussed in related tasks some expectation can be wrong, the other changes can be incompatible due to backward compatibility or so.
That's why I suggest to fix the issue by providing more details to the admin user in error message to solve the issue.
@ihor-sviziev please suggest the possible solution and I'll try to add it to PR.

Thank you.

@ihor-sviziev
Copy link
Contributor

@sergiy-v i got your point, seems reasonable. Will review your PR little bit later

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @sergiy-v,
Please review my comments and static test failures (except copy paste failure, this is known issue) and update your changes accordingly

@sergiy-v sergiy-v force-pushed the 13689-category-url-key-validation-improvements branch 2 times, most recently from e8670cf to d187211 Compare March 25, 2020 09:42
@sergiy-v sergiy-v force-pushed the 13689-category-url-key-validation-improvements branch from d187211 to 577a27e Compare March 25, 2020 12:21
@sergiy-v
Copy link
Contributor Author

Hi @sergiy-v,
Please review my comments and static test failures (except copy paste failure, this is known issue) and update your changes accordingly

Thanks for suggestions, the changes has been added. I believe the tests errors not related to the changes, please check it.

Thank you.

@sergiy-v sergiy-v requested a review from ihor-sviziev March 25, 2020 15:42
@ihor-sviziev ihor-sviziev added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage labels Mar 25, 2020
@ihor-sviziev
Copy link
Contributor

Hi @lenaorobei @slavvka,
could you give some more info why dB compare test fails, all results inside are green. Tried restarting, but the same result

@ihor-sviziev
Copy link
Contributor

Oh, looks after merging 2.4 develop the issue is gone. Thank you @lenaorobei !

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Looks like test failures are not related to changes from this PR

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-7208 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Before:
Screenshot from 2020-03-26 12-11-01

After:
Screenshot from 2020-03-26 12-19-06

Screenshot from 2020-03-26 12-30-14

@engcom-Echo
Copy link
Contributor

Failed functional tests not related to the changes in this PR - comment

@m2-assistant
Copy link

m2-assistant bot commented Mar 27, 2020

Hi @sergiy-v, 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
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: test coverage Component: CatalogUrlRewrite Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create catagory's name with thai langauge
6 participants