Jump to content

[SOLVED] Upgrading to 1.6.1.6 and lost some language translations


Recommended Posts

Hello

 

I upgraded to version 1.6.1.6 and then I lost some of the Norwegian translations on the shop.

Not all, but some.

When I go to Localisation -> Translations and choose to translate words manually for the shop I get an error message saying that the php configuration exceeds the maximum fields 1000 for max_input_vars and that I should increase the number to 1140.

 

I do have a php.ini in the root of the web shop.  The php.ini ls listed in the bottom here.

 

Advarsel! PHP-konfigurasjonen overgår antall tillatte felter i skjemaet 1000 for max_input_vars.
Ta kontakt med leverandøren din for å øke denne begrensingen til 1140 minimum, ellers må du redigere oversettelsesfilene.

 

register_globals=off
 
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000
 
; Magic quotes for incomming GET/POST/Cokie data
magic_quotes_gpc = off
 
; Magic quotes for runtime-generated date
magic_quotes_runtime = off
 
memory_limit = 512M
 
allow_url_include = Off
safe_mode = Off

 

safe_mode_gid = Off
 
 
Do you see anything wrong here ????
 
 
Petter
Edited by Penge (see edit history)
Link to comment
Share on other sites

Some hosting doesn't allow to change parameters in the php.ini, the parameter "max_input_vars" is one of the restricted, especially in the shared hosting.

 

You will need contact with the hosting manager and request this change.

Link to comment
Share on other sites

Hi again

 

I used the phpinfo and i came our with lots of informations.

When it comes to max_input_vars it shows 10000 which correspond to the number I used in my php.ini

I contacted my provider but they could not find anything wrong on their side.

 

So why is Prestashop reporting that max_input_vars has a limit at 1000 when phpinfo reports it set to 10000 ????

 

Strange.....

 

Petter

Link to comment
Share on other sites

Here is the relevant code from the Prestashop source code (\controllers\admin\AdminTranslationsController.php)

    public function displayLimitPostWarning($count)
    {
        $return = array();
        if ((ini_get('suhosin.post.max_vars') && ini_get('suhosin.post.max_vars') < $count) || (ini_get('suhosin.request.max_vars') && ini_get('suhosin.request.max_vars') < $count)) {
            $return['error_type'] = 'suhosin';
            $return['post.max_vars'] = ini_get('suhosin.post.max_vars');
            $return['request.max_vars'] = ini_get('suhosin.request.max_vars');
            $return['needed_limit'] = $count + 100;
        } elseif (ini_get('max_input_vars') && ini_get('max_input_vars') < $count) {
            $return['error_type'] = 'conf';
            $return['max_input_vars'] = ini_get('max_input_vars');
            $return['needed_limit'] = $count + 100;
        }
        return $return;
    }

You might have a look at "suhosin.request.max_vars"...

Link to comment
Share on other sites

Thanks Musicmaster but I don't know how to use your information.

I am not a programmer so even if I understand some program codes I don't know how to get further on my case.

 

Can you please helo me further ??

 

Thanks.

 

 

 

Petter

Link to comment
Share on other sites

This is what's in my php.ini regarding those parameters:

 

max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000
 
 
Is this correct or is anything missing ?
Link to comment
Share on other sites

Now my php.ini looks like this.

Still got the error.

 

register_globals=off
 
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000;
suhosin.request.max_vars = 10000;
 
; Magic quotes for incomming GET/POST/Cokie data
magic_quotes_gpc = off
 
; Magic quotes for runtime-generated date
magic_quotes_runtime = off
 
memory_limit = 512M
Link to comment
Share on other sites

And if you go the webshop www.strazz.no you will see that most text in the opening page is in Norwegian but if you creat an account and go to My Account the text is English and that is not how it was before the upgrade.

Link to comment
Share on other sites

Strange case, you can try to do a copy of your site and paste in your localhost, then here you will be able to change the translations, then update your theme folder in your server with the modified in the localhost.

 

Translations also can be do manually, but is not a good idea, is little dificult if you don't have the sufficient knowledge.

Link to comment
Share on other sites

Translations of modules can found at:

/modules/module_name/translations/

Translations of theme can found at:

/themes/theme_name/lang/

Translations of a module for a particular theme at (this override the translations in the module folder):

/themes/theme_name/modules/module_name/translations/
Link to comment
Share on other sites

I copied on the translation files from a backup and now it seems to be mostly back to my national language again.

However there are still som words I would like to translate.  Since Prestashop translation feature is not working for me do you know is there's a third part software for translation that workes outside Prestashop ?  That would enter the Prestashop translation files with the correct syntax and so ??

 

Thanks

 

Petter

Link to comment
Share on other sites

I copied on the translation files from a backup and now it seems to be mostly back to my national language again.

However there are still som words I would like to translate.  Since Prestashop translation feature is not working for me do you know is there's a third part software for translation that workes outside Prestashop ?  That would enter the Prestashop translation files with the correct syntax and so ??

 

Thanks

 

Petter

I really don't know if exists, but I don't think so.

Link to comment
Share on other sites

This have to be a bug in the update file. Think they will fix it in the next update. 

I have a fresh install with the latest version (1.6.1.6) and this is not a problem, I don't know if the problem come when upgraded.

Link to comment
Share on other sites

I have the norwegian language yes.

Most of it is back now after I just copied back some translation files but still I cannot use the translation feature of Prestashop and that is annoying.

 

I may have forgot to mention that it's only the translation of the SHOP that is not working.

All other translation options iike administration, fields, emails and such seems does not give any errors.

Edited by Penge (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Update on this case.

 

The problem is now solved.

 

The problem was related to were the php.ini was located.

On my server it had to be in the ADMIN folder and not in the root of the web shop.

The solution I got from a Prestashop group on facebook.  Thanks to them.

 

So if you have a similar problem.  Try to move your php.ini from root to the Admin folder.

That was the clue for me.

 

Now everything regarding the translations is working as it should 

.

 

Petter

Link to comment
Share on other sites

  • 1 month later...

Hei Øyvind

 

Jeg har laget en php.ini file en gang.

Laget det med en vanlig notepad editor og lastet den opp.

Min file ser slik ut:

 

register_globals=off
 
max_input_vars = 10000;
suhosin.get.max_vars = 10000;
suhosin.post.max_vars = 10000;
suhosin.request.max_vars = 10000;
 
; Magic quotes for incomming GET/POST/Cokie data
magic_quotes_gpc = off
 
; Magic quotes for runtime-generated date
magic_quotes_runtime = off
 
memory_limit = 512M
 
 
 
 
Kall den php.ini og last den opp via ftp.  Legg den i admin katalogen din.
 
 
ok ??
 
 
 
Hilsen Petter
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...