Jump to content

[SOLVED] Why I can not change language in main page?


Recommended Posts

I have Prestashop 1.4 and I noticed a strange Behaviour with languages: When I am on the main page I can’t change the language, but When I’m in a product page, I can change to the different language;. So is this some kind of a bug or maybe some kind of a feature in PS??

 

URLs of language icons are uncorrect. If you check my site www.s2cplanet.com you see that URL on the flag icon is refered to a page .php that doesn’t exist

 

Please help me

 

 

 

Sandra

Link to comment
Share on other sites

Hello Mike

thank you for your fast answer

What I'm using is the default theme. I only changed the colours and text but it's the original

Thank you for your help

 

Sandra

 

Hello Mike

 

thanks for your fast help and answer

What I'm using it's the default theme, I only changed the colours and text but it's the original

 

Let me know if you can

 

Sandra

Link to comment
Share on other sites

Hello

tried to replace but still the same problem.

I noticed that the link reference over the flag is wrong http://www.s2cplanet.com/shop/.php?&id_lang=2

It doesn't exist the file named .php

but if you choose a product then the URL works fine

Is it possible that the problem is why my shop is under folder "SHOP"

 

Thank you for your help

You are the only one that answer me

 

Sandra

Link to comment
Share on other sites

Hello Mike

yes I done. Same problem. Only on main page the flags have bad URL

Inside the site URL is right.

 

Don't you where I can edit this URL Of the flag

 

Sorry to bother you but you are the only one that answers me

 

Sandra

Link to comment
Share on other sites

I have done and the URL over the flag has changed Now it's http://www.s2cplanet.com/shop/en/.php but as you can see a file only .php doesn't exist and so ERROR 404 PAGE NON AVAILABLE

 

I just sat down with a developer to take a look at this, and he suggested that you uninstall and then reinstall the Languages Block module through your Back Office, as it appears that the files may be corrupted in there.

 

-Mike

Link to comment
Share on other sites

I have already done. Tried to cancel the module and reinstalled.

It seems that only in the web page there's this mistake. try yourself : if you choose a catalogy or product then you can change the language.

But if you stay in home page you can't click the flags

Link to comment
Share on other sites

I have already done. Tried to cancel the module and reinstalled.

It seems that only in the web page there's this mistake. try yourself : if you choose a catalogy or product then you can change the language.

But if you stay in home page you can't click the flags

 

I understand that, and like I said, this appears to be due to some sort of corrupted file. If you are still having this issue after all of the suggestions I've posted above, along with clearing your browser and smarty caches, the only other suggestion I can offer right now is that you back up your site and database, and then try a clean reinstall because it will be much more difficult and time consuming to identify the error in a single file out of thousands.

 

-Mike

Link to comment
Share on other sites

  • 3 months later...

I've the same problem. Everything works fine on product or cms page, but not on a main page. On a main page I can change language only once. If I want to change it back, language is not changed. By changing a flag link with firebug from www.....com/en/ to wwww.....com/en/index.php language is changed back. If I remove slash from the end of a language flag link with firebug (url becomes www.....com/en), language also is changed back. Probably the quickest solution would be to remove slash as a last symbol when language links are generated. In any way it looks like a bug of PS.

Link to comment
Share on other sites

I've the same problem. Everything works fine on product or cms page, but not on a main page. On a main page I can change language only once. If I want to change it back, language is not changed. By changing a flag link with firebug from www.....com/en/ to wwww.....com/en/index.php language is changed back. If I remove slash from the end of a language flag link with firebug (url becomes www.....com/en), language also is changed back. Probably the quickest solution would be to remove slash as a last symbol when language links are generated. In any way it looks like a bug of PS.

 

Hi Audrius,

This is not a bug with PrestaShop, but I'd be happy to take a look at this for you to try to help you resolve it. Can you please provide a link where we can see this for ourselves?

 

-Mike

Link to comment
Share on other sites

Yes, sure. I had this problem not just with 1.4.x version. www.visaslecas.lv. Try to change languages on a main page form one to other. Try to set Russian, then back to Latvian, then Russian again, again to Latvian... Funny thing is that this bug is only with FF and IE. Chrome has an immunity. I'd be happy to get a solution and not to play with slash at the end.

Link to comment
Share on other sites

Yes, sure. I had this problem not just with 1.4.x version. www.visaslecas.lv. Try to change languages on a main page form one to other. Try to set Russian, then back to Latvian, then Russian again, again to Latvian... Funny thing is that this bug is only with FF and IE. Chrome has an immunity. I'd be happy to get a solution and not to play with slash at the end.

 

I just tested this in Chrome, IE and Firefox, and had the same results in all three; no issues switching back and forth, even multiple times, between the two languages. Can you please try clearing all of your browsers' caches and cookies and see if that works any better for you?

 

-Mike

Link to comment
Share on other sites

Try to change multiple times and only on a main page. Page continues to refresh, but language is not changed any more. Clearing of cookies helps for a while, but try to explain that for customer. :) I have tried this on different computers, different browsers and problem were the same. We also get reports about that issue from our customers. Currently we are working on adopting template for both languages and probably we will modify language block module to remove trailing slash.

Link to comment
Share on other sites

Try to change multiple times and only on a main page. Page continues to refresh, but language is not changed any more. Clearing of cookies helps for a while, but try to explain that for customer. :) I have tried this on different computers, different browsers and problem were the same. We also get reports about that issue from our customers. Currently we are working on adopting template for both languages and probably we will modify language block module to remove trailing slash.

 

I did this, switching three times back and forth between languages on each browser. Is there any other way I could try to replicate this error on my end?

 

-Mike

Link to comment
Share on other sites

  • 1 month later...

Sorry, Mike. I was to lazy to find a screen capture software. I just modified blocklanguages.tpl to remove trailing slash and problem has gone. I wasn't sure that php source modification will not change anything else, so I have chosen to modify smarty template. Here is the modification

 

... some code scipped ...

{if isset($lang_rewrite_urls.$indice_lang)}
  <a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">
 {else}
  {assign var=lang_link value=$link->getLanguageLink($language.id_lang)}
  {if '/' == $lang_link|substr:-1}
   {assign var=lang_link value=$lang_link|substr:0:-1}
  {/if}	 
  <a href="{$lang_link}" title="{$language.name}">
 {/if}

... some code scipped ...

Link to comment
Share on other sites

×
×
  • Create New...