Sylius version affected: 1.5.0
Description
I can't see created products in the administration, I can see them in store frontend. I checked several things:
1) I have only one locale - cs (configured during the installation)
2) My channel has this locale set
3) My user account has this locale set
4) My product has translation in this locale
However, when I check the DQL queries in profiler I can see there is parameter for locale with value en_US even though I selected cs as default locale during the installation and never configured anything about en_US.
Steps to reproduce
bin/console sylius:installCZK and default locale cs/admin/products/ or /admin/products/taxon/1Check the value of the locale parameter: php bin/console debug:container --parameter locale
You have to set it manually.
Edit: manually changing it to cs is just a workaround and not a bug fix
Forgot about than one, changing it in config/services.yaml worked. But maybe it's not a great UX behavior and it could be set during installation?
No, it can't be set during the installation, but it should not break the product listing in the admin panel anyway.
https://github.com/Sylius/Sylius/blob/d76b120075abf1eacfb3076175159db50b8be281/src/Sylius/Bundle/CoreBundle/Resources/config/services.xml#L163
This line caused your issue, but I don't see other sources of default locale.
Also, this is documented (see the first warning message): https://docs.sylius.com/en/1.5/book/installation/installation.html
So it's not a bug.
I actually read the warning message before I posted the issue, but I get it like "sylius:install will set the locale and currency. If you want to change the default values later, do it in Configuration > Channels and in config\services.yaml".
Maybe a message during the command sylius:install would improve the DX. Something like "You may also need to change the Symfony locale in config\services.yaml."
The difference between a default locale set in services.yaml and the locale set in administration panel (as an entity) can be indeed confusing. Would you be able to open a PR with a proposed message during installation? Then we could iterate over this solution in comments :) Thanks! 馃殌
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.
Most helpful comment
The difference between a default locale set in
services.yamland the locale set in administration panel (as an entity) can be indeed confusing. Would you be able to open a PR with a proposed message during installation? Then we could iterate over this solution in comments :) Thanks! 馃殌