Open maximehuran opened 3 weeks ago
One solution is to replace the regular expression of the locale in config/routes/sylius_shop.yaml
so that it doesn't correspond to 4 characters. Example:
requirements:
- _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$
+ _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
You need to adapt this expression to your project!
Example
Redirect
/faq
to/en/faq
Will result to a redirect to the homepage because Sylius think
faq
is a localeSylius calls the homepage with default locale in this listener