1

i've an issue on magento 2.2.5. I've created two store view it/en, when I'm on product page and change store view from it to en and vice versa, I'm redirected to the home page. Someone can help me? Thanks.

4
  • Could you please send me URL, please ? Commented Oct 9, 2018 at 11:13
  • maybe you have different products and categories in both store, so when you switch it seems not found or else cause might be redirected to the homepage, check all error log(magento / server log)
    – Hitesh
    Commented Oct 9, 2018 at 11:46
  • @SagarU store.grafspa.com
    – Antonio
    Commented Oct 9, 2018 at 12:38
  • Why downvoting this? Commented Jan 31, 2019 at 11:17

1 Answer 1

3

There are several bug reports about this in https://github.com/magento/magento2

It seems problem is not fixed yet, even in 2.3.X, but there are some fix proposals if you browse open issues... Main problem is, in 2.2.5 CE version, the Model Magento/UrlRewrite/Model/StoreSwitcher/RewriteUrl.php does not exist

Upgrading to 2.2.6 CE, so we get that model file, and patching it with this https://github.com/magento/magento2/pull/20093/commits/856a80f827329930f37fcf05d50edf9f47c2855e fixed the issue

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.