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

Uniqueness validation added on Taxonomy's name and Taxon's permalink #8050

merged 1 commit into from Jun 10, 2017


None yet
2 participants

manishrawat0212 commented Jun 9, 2017

Uniqueness validation constraint should be applied to taxonomy's name and taxon's permalink.


Under Categories root taxon, create two taxons with name Test_1 and Test_2 respectively.
Now edit the Test_2 taxon.
Change the permalink field to Test_1 and Update.
Taxon will be saved successfully and its permalink will become categories/test-1, which is same as Test-1 taxon’s permalink.


In front end, by clicking the link to Test_2 taxon, products under Test_1 taxon will appear.


Add uniqueness validation on taxon’s permalink.
In taxon’s edit form, adding required: true in :permalink_part text_field_tag will also be helpful. It will ensure that the admin must fill out this field.

If we allow multiple taxonomies to have same name, then there root taxons will also have same name and permalink. To avoid this situation, uniqueness validation should also be added to taxonomy's name.

@manishrawat0212 manishrawat0212 changed the title from Uniqueness validation added on Taxon's permalink to Uniqueness validation added on Taxonomy's name and Taxon's permalink Jun 9, 2017


This comment has been minimized.

Show comment
Hide comment

damianlegawiec Jun 10, 2017


Thank you @manishrawat0212 , this is great work 👍


damianlegawiec commented Jun 10, 2017

Thank you @manishrawat0212 , this is great work 👍

@damianlegawiec damianlegawiec merged commit 5bf3e29 into spree:master Jun 10, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
hound No violations found. Woof!

@manishrawat0212 manishrawat0212 deleted the manishrawat0212:taxon-permalink-fixes branch Jun 10, 2017

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