Organizational Research By

Surprising Reserch Topic

magento multilanguage double change in language resuts in 404 or how to chang

magento multilanguage double change in language resuts in 404 or how to chang  using -'url,magento,seo,http-status-code-404,multilingual'

I have a problem with a magento installation. I used Magento ver., community edition to develop this website

The problem appears when I change the language from the EU version to French and after that to German. The change to french is ok, but when in the same page i change to German i receive a 404 error. Also this is generation 404 errors in the Google webmaster tools and when i try for example to take this link and paste it in the browser it gives me also a 404 error. I have there some 50 products and ~550 404 errors in Google Webmaster tools. I understand that the problem is from what I described.

Moreover I have a SEO problem since I have this page in french:

And when I switch to the german version of the website it takes me to this link

_from_store=fr"> (if i try now to switch to uk I will get the 404 mentioned above)

instead of going to this one:

Already checked this 404 error when switching between stores when in a category on magento but it does not relate to my problem.

About settings:

I use the caching service and also I did index all the content.
The product or category I am trying to access is available and set active for all the languages.
System > General > Web > URL options > Add Store Code to Urls is set
to yes.
System > General > Web > Search Engines Optimization > Use Web Server
Rewrites is set to yes.
No other changes has been made to the .htaccess file except for the
ones that the system itself made.

So to conclude: the problem is the 404 given by 2 succesive changes of the language and the bad url address when I switch from one page to another.

Any suggestions would be appreciated.

UPDATE: tried this _from_store-query-parameter-when-switching-store-views-in-magento"> but it results in a 404 at the first language change

Edit #1:

Found the problem: file languages.phtml contained this code <?php echo str_replace ("/fr/","/de/",$_lang->getCurrentUrl()); ?> and actually did replace only the language code and not the whole url according to the corresponding translation.

So applied to this

it will return

So does anyone know how to get the corresponding URL of the current page for the other languages available in the store?

Edit #2 (using @Vinai solution):

It works on the product pages but not on the category yet.

asked Oct 19, 2015 by sumit_jaiswalmca
0 votes

Related Hot Questions

1 Answer

0 votes
answered Oct 19, 2015 by akhilesh