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 ?– samumaretiyaCommented 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)– HiteshCommented Oct 9, 2018 at 11:46
-
@SagarU store.grafspa.com– AntonioCommented Oct 9, 2018 at 12:38
-
Why downvoting this?– Raul SanchezCommented Jan 31, 2019 at 11:17
1 Answer
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