Test Language Error

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
stevesmind
Posts: 2
Joined: Mon Aug 13, 2012 10:39 am

Test Language Error

Post 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!
stevesmind
Posts: 2
Joined: Mon Aug 13, 2012 10:39 am

Re: Test Language Error

Post by stevesmind »

Forgot to mention, you will have to replace the same line on line 603 of admin_settings_save.php
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Test Language Error

Post 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?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply