I have a problem installing magento. I used Magento ver. 1.5.0.1, a community publication for the development of this website http://cissmarket.com/ .
The problem arises when I change the language from the EU version to French, and then to German. The change to French is normal, but when I switch to German on the same page, I get a 404 error. In addition, these are 404 generation errors in Google’s webmaster tools, and when I try, for example, to take this link and paste it into browser, it also gives me 404 error. I have about 50 products and ~ 550 404 errors in Google webmaster tools. I understand that the problem is what I described.
In addition, I have a problem with SEO, as I have this page in French:
http://cissmarket.com/de/cartouches-refilables.html
And when I switch to the German version of the website, it will lead me to this link
http://cissmarket.com/de/cartouches-refilables.html?___from_store=fr (if I try to switch to uk now, I will get the 404 mentioned above)
instead of this:
http://cissmarket.com/de/nachfullpatronen.html
Error 404 has already been checked when switching between stores when in a category on magento , but this does not apply to my problem.
About settings:
- I use the caching service and also indexed all the content.
- The product or category I'm trying to access is available and installed for all languages.
- System> General> Web Settings> URL Settings> Add Store Code for URLs yes.
- System> General> Web> Search Engine Optimization> Using Web Server Rewrites is set to yes.
- No other changes were made to the .htaccess file, except for which the system itself made.
So the problem is that the problem is the 404 given by two consecutive language changes and the wrong URL when switching from one page to another.
Any suggestions would be appreciated.
UPDATE: tried this http://www.activo.com/how-to-avoid-the-___from_store-query-parameter-when-switching-store-views-in-magento , but this leads to 404 on the first change of language
Edit # 1:
Found a problem: languages.phtml file contained this code <?php echo str_replace ("/fr/","/de/",$_lang->getCurrentUrl()); ?> <?php echo str_replace ("/fr/","/de/",$_lang->getCurrentUrl()); ?> and actually replaced only the language code, and not the entire url in accordance with the corresponding translation.
Therefore applied to this
http://cissmarket.com/fr/cartouches-refilables.html
he will return
http://cissmarket.com/de/cartouches-refilables.html
Does anyone know how to get the corresponding URL of the current page for other languages available in the store?
Edit # 2 (using @Vinai's solution):
It works on the product pages, but does not belong to the category.