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.

  • Could you please send me URL, please ? – samumaretiya Oct 9 '18 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 Oct 9 '18 at 11:46
  • @SagarU store.grafspa.com – Antonio Oct 9 '18 at 12:38
  • Why downvoting this? – Raul Sanchez Jan 31 '19 at 11:17

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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