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
Same Taxonomies in different stores #12019
Comments
Thanks for reporting, I see this DB migration is to blame: spree/core/db/migrate/20230514162157_add_index_on_locale_and_permalink_to_spree_taxons.rb Line 3 in d3927a3
this should be a combined index on |
We are creating a shop for a client and there is a big problem with taxonomies. Do you have another idea to solve the problem mentioned in this thread? |
@damianlegawiec I am definitely in favor of taxonomies being applied to all stores. Then the products will not show errors or holes in their names after changing the store. |
@damianlegawiec and @rafalcymerys table: spree_product_translations
table: spree_taxon_translations
table: spree_taxons
table: spree_products
|
Please, do it xD i need this for my Client. |
@damianlegawiec What are the possibilities for a fix to be released soon? |
we're planning to fix this with v4.8 releasing this week/early next week, we're also reviewing other translation migrations |
@damianlegawiec Thanks |
Hello! What are our chances of completing this task? |
* Use original column for the translatable fields in the default locale * Remove migrations for transferring and deleting translatable data * Fixes #12019
…in original columns (#12040) * Use column_fallback plugin from mobility: * Use original column for the translatable fields in the default locale * Remove migrations for transferring and deleting translatable data * Fixes #12019 * fixed `Taxonomy#set_root_taxon_name` * Fix translations for properties: remove name from being translated * Update has_webhooks_spec.rb * Fixed `Taxon#sync_taxonomy_name` * Adjust what's being translated + correct product scopes * added `Spree.use_translations?` and `Spree::Core::RuntimeConfig` * Updae mailer specs * * Fix `Spree::Products::Sort` to select translatable fields only when using translations * Update API V2 Storefront Products specs * Fix and refactor collection sorters * Update `Spree::Api::V2::ResourceController` specs * Use directly the `Spree.use_translations?` in finders and sorters --------- Co-authored-by: Damian Legawiec <damian@getvendo.com>
It's awesome! Has been successfully updated to the latest version. |
Context
Same Taxonomies in different stores, rails raise an error:
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "unique_permalink_per_locale"
DETAIL: Key (locale, permalink)=(en, categories) already exists.
):
Default store has a taxonomy named 'Categories', change to other store again create a taxonomy named 'Categories', then raise an error like above. These store are same locale 'en' but different currency and VAT rules.
Expected Behavior
Different stores had same Taxonomies.
Actual Behavior
Server error 500
Possible Fix
Maybe taxonomies can apply to all stores.
Steps to Reproduce
Your Environment
4.8.0.Beta
The text was updated successfully, but these errors were encountered: