Page 1 of 1

Test Language Error

Posted: Mon Aug 13, 2012 10:49 am
by stevesmind
It seems the test language function is not working properly on HESK 2.4 which unables you to change any setting at all on the admin/settings page.

The function is unable to read the text.php file correctly thus returning the following error(s):

Code: Select all

/language
   |-> /en
        |-> text.php: ERROR
              |---->  MISSING: $hesklang['LANGUAGE']
              |---->  MISSING: $hesklang['ENCODING']
              |---->  MISSING: $hesklang['_COLLATE']
              |---->  MISSING: $hesklang['EMAIL_HR']
              |---->  WRONG VERSION (not 2.4)
This problem is caused by a wrong REGEX on the preg_match function because the file_get_contents() returns the PHP variables as: $hesklang[\'LANGUAGE\'] and the regex is looking for $hesklang['LANGUAGE'].

The simplest work-around I found is to simply add the stripslashes() function on the file_get_contents() on line 1759 of your admin_settings.php like this:

Code: Select all

stripslashes(file_get_contents($langu));
Hope this helps.
And thanks, Klemen Stirn, for you work on this tool!

Re: Test Language Error

Posted: Mon Aug 13, 2012 11:17 am
by stevesmind
Forgot to mention, you will have to replace the same line on line 603 of admin_settings_save.php

Re: Test Language Error

Posted: Mon Aug 13, 2012 5:57 pm
by Klemen
I can't seem to be able to duplicate the error and many users have had no problems saving settings.

Could you let me know what version of PHP you are using and post a link to phpinfo.php file here?