Wrong locale context for multi channels
Sylius version : 1.13.5 Sitemap plugin version : 2.4.3
Hello,
I encounter an error generating sitemap with multiple channels having different locales.
The error occurs in ProductUrlProvider because of the localeContext that always returns base locale "fr_FR". How can I fix it ?
Thanks by advance.
Hi @Giraudierpierre It's a bit hard to say without more information. Can you produce an error with more details? I cannot reproduce this at the moment.
Hello @stefandoorn
The error occures when I create 2 channels with fr locale for the first and en locale for the second one. It's important that the second channel does not have the default locale fr.
I think this pull request tried to fix the same problem : https://github.com/stefandoorn/sitemap-plugin/pull/197
Sylius: 2.0.7 Sitemap plugin: 3.0.0-alpha3 (latest alpha)
I can confirm the same problem - two channels, each with a different locale. The sitemap generation fails with the above mentioned error.
How to reproduce
- Channel A
- code: default
- url: https://www.example.com
- default_locale: en_US
- locales:
- en_US
- Channel B
- code: de
- url: https://www.example.de
- default_locale: de_DE
- locales:
- de_DE
Running bin/console sylius:sitemap:generate -c de runs into an error.