You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a collection is configured for 2 or more languages with different slugs, if you perform a "search" query using shop api localized url (xx/shop-api?languageCode=en, for instance), it fails to find the products in that collection (which on turn are localized in both languages), as it seems to expect to always expect to receive the default language slug and not the localized one.
Replacing the collectionSlug with collectionId obviously fixes the issue and is a good workaround.
To Reproduce
Steps to reproduce the behavior:
Go to Vendure admin and configure 2 supported languages (e.g. italian main language, english secondary language)
Create a new collection and configure different slugs for each language
Associate at least one product to this collection and localize it for the 2 (or more) languages
Go to the graphql playground with the languageCode=en parameter (where en is the secondary language)
Perform a search query using the secondary language slug and see empty result
Expected behavior
Localized search query should "use" the localized collection slug
Environment (please complete the following information):
@vendure/core version: 0.18.3
Database (mysql/postgres etc): postgres
The text was updated successfully, but these errors were encountered:
Thanks for the report. I can reproduce this 👍 I believe it is caused by the fact that no event is being emitted when updating only the name/slug of the Collection, and therefore the search index is not getting updated. You can verify this by manually updating the search index (gear icon in product list view) and then seeing whether things work as expected.
Describe the bug
If a collection is configured for 2 or more languages with different slugs, if you perform a "search" query using shop api localized url (
xx/shop-api?languageCode=en
, for instance), it fails to find the products in that collection (which on turn are localized in both languages), as it seems to expect to always expect to receive the default language slug and not the localized one.Replacing the collectionSlug with collectionId obviously fixes the issue and is a good workaround.
To Reproduce
Steps to reproduce the behavior:
languageCode=en
parameter (where en is the secondary language)Expected behavior
Localized search query should "use" the localized collection slug
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: