Page 1 of 1

$hesklang['inve']='Invalid email file';

Posted: Tue Nov 26, 2013 7:31 pm
by JohnR
Script URL:
Version of script: 2.5.2
Hosting company: domeneshop.no
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: 'Invalid email file'

Write your message below:
When I reply a costumer for the first time, English language, everything works fine.
When I switch to Norwegian I get the "ERROR: Invalid email file" ($hesklang['inve']) As I can see it comes from email_functions.inc.php.

To make it work until I get your feedback I have temporarily blocked out: (line 458 - 461):

/* Verify this is a valid email include */
/* if ( ! isset($valid_emails[$eml_file]))
{
hesk_error($hesklang['inve']);
}
-------------------------------------
and (line 360 - 371):

/* Get list of valid emails */
$valid_emails = hesk_validEmails();

/* Verify this is a valid email include */
if ( ! isset($valid_emails[$eml_file]))
{
hesk_error($hesklang['inve']);
}
else
{
$msg = $valid_emails[$eml_file];
}
-------------------------------------
I have completed the language test successfully!

Do you have a solution for me? :twisted: :D
Thanks
JR

Re: $hesklang['inve']='Invalid email file';

Posted: Tue Nov 26, 2013 7:50 pm
by Klemen
Have you been modifying any of the files?

Try changing

Code: Select all

hesk_error($hesklang['inve']);
to

Code: Select all

hesk_error($hesklang['inve']. ": ". $eml_file);
to see which file is causing problems.

Re: $hesklang['inve']='Invalid email file';

Posted: Wed Nov 27, 2013 7:19 am
by JohnR
No, I have not modified any files.

I changed as suggested. New error appears. ERROR: Invalid email file: new_reply_by_staff .

// --> Staff replied to a ticket
'new_reply_by_staff' => $hesklang['new_reply_by_staff'],

Re: $hesklang['inve']='Invalid email file';

Posted: Wed Nov 27, 2013 10:27 am
by Klemen
The error message is misleading, but I think the problem is you don't have this variable defined in Norwegian language pack: $hesklang['new_reply_by_staff']

Try adding this to your Norwegian text.php file:

Code: Select all

$hesklang['new_reply_by_staff']     = '[#%%TRACK_ID%%] Nytt svar til: %%SUBJECT%%';

Re: $hesklang['inve']='Invalid email file';

Posted: Wed Nov 27, 2013 10:49 am
by JohnR
Thank you, the last line of script in my language file did the trick. Together with the previous modifications.
I have one more issue, how to make it work with the Norwegian letters Æ Ø Å when sending the pre-made emails back to costumers?
Thanks again!
JR

Re: $hesklang['inve']='Invalid email file';

Posted: Wed Nov 27, 2013 3:45 pm
by Klemen
The template file needs to be saved in UTF-8 format and it should work fine (assuming your text.php and $hesklang['ENCODING'] are also UTF-8 as required by HESK).