Jump to content

Bug with order status message in Thai language and possiblity with other language.


Recommended Posts

I m installing a shop into Thai Language and has the following issues, when an order is confirmed by the bank-wire or cheque module I have the following exception.

 

 

Property Mail->subject is not valid
at line 872 in file classes/ObjectModel.php

867. 868. 			$message = $this->validateField($field, $this->$field);869. 			if ($message !== true)870. 			{871. 				if ($die)872. 					throw new PrestaShopException($message);873. 				return $error_return ? $message : false;874. 			}875. 		}876. 877. 		return true;

 

 

the php mail is refusing to send emails when the subject is in different language, I ve tried to install the fix Thai patch for prestashop but did not work, any help is appreciated.

 

I guess i must add some lines of the email validator to accept thai charecters but i dont know which module i must modifiy.

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

just to mention that I have the cause of the problem it s the function inside  the class ValidateCore

 

 

    public static function isMailSubject($mail_subject)
    {
        return preg_match(Tools::cleanNonUnicodeSupport('/^[^<>]*$/u'), $mail_subject);
    }
 

could anyone tell what is the pattern I should use so it will accept Thai characters.

Edited by martenBoy (see edit history)
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...