Jump to content

Property CustomerMessage->message is empty at line 881 in file classes/ObjectModel.php


ioan1iuga
 Share

Recommended Posts

Hi, 

 

I had some trouble with the shop email lately and I asked Bluehost to check it out for me. They opened a ticket and said the problem will be solved in a couple of days. Two days after, customer service in BO cannot be accessed anymore. 

 

Every time I click on it I get this code:

 

[PrestaShopException]

Property CustomerMessage->message is empty
at line 881 in file classes/ObjectModel.php

876.
877.             $message = $this->validateField($field, $this->$field);
878.             if ($message !== true)
879.             {
880.                 if ($die)
881.                     throw new PrestaShopException($message);
882.                 return $error_return ? $message : false;
883.             }
884.         }
885.     
886.         return true;

 

My Prestashop version is 1.6.1.0. 

 

Can anyone help, please?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Check in your table ps_customer_message - for an empty "message" field.

 

You can use this query from PhpMyAdmin:

select * from ps_customer_message 
where message is null or message = '';

You need to add something there, so it will not be empty anymore. Any text will do (even a single space).

  • Like 1

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Has anyone found a resolution to this issue?  

 

[PrestaShopException]

Property CustomerMessage->message is empty
at line 909 in file classes/ObjectModel.php

904. }
905.
906. $message = $this->validateField($field, $this->$field);
907. if ($message !== true) {
908. if ($die) {
909. throw new PrestaShopException($message);
910. }
911. return $error_return ? $message : false;
912. }
913. }
914.

Share this post


Link to post
Share on other sites

  • 2 months later...
  • 2 months later...

Hi, I have the same problem and attached the screen shot for reference. Am not techie and don't know how to work in codes. Can any one help me to solve this issue.

When i click email, am getting this error message. Have this error after when i try to configure IMAP email for my store.

Please give me the solution to this urgently, thanks.

Edited by boratoclothing (see edit history)

Share this post


Link to post
Share on other sites

Hi, I have the same problem and attached the screen shot for reference. Am not techie and don't know how to work in codes. Can any one help me to solve this issue.

When i click email, am getting this error message. Have this error after when i try to configure IMAP email for my store.

Please give me the solution to this urgently, thanks.

Hi, you are showing sensitive informations in your screen shot. Try to hide your admin URL. 

Share this post


Link to post
Share on other sites

Hi ndiaga

Noted, i removed the screen shot. Do you have any solution for my issue. Please help.

I think your problem is similar to this one. 

Go classes/CustomerMessage.php  and find field message, set it not required meaning :false . See the code below from CustomerMessage.php

class CustomerMessageCore extends ObjectModel
{
	public $id;
	public $id_customer_thread;
	public $id_employee;
	public $message;
	public $file_name;
	public $ip_address;
	public $user_agent;
	public $private;
	public $date_add;
	public $date_upd;
	public $read;

	/**
	 * @see ObjectModel::$definition
	 */
	public static $definition = array(
		'table' => 'customer_message',
		'primary' => 'id_customer_message',
		'fields' => array(
			'id_employee' => 		array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
			'id_customer_thread' => array('type' => self::TYPE_INT),
			'ip_address' => 		array('type' => self::TYPE_STRING, 'validate' => 'isIp2Long', 'size' => 15),
			'message' => 			array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => true, 'size' => 65000),
			'file_name' => 			array('type' => self::TYPE_STRING),
			'user_agent' => 		array('type' => self::TYPE_STRING),
			'private' => 			array('type' => self::TYPE_INT),
			'date_add' => 			array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
			'date_upd' => 			array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
			'read' => 				array('type' => self::TYPE_BOOL, 'validate' => 'isBool')
		),
	);
	 
'message' => array('type' => self::TYPE_STRING, 'validate' => 'isCleanHtml', 'required' => false, 'size' => 65000), 
 

Share this post


Link to post
Share on other sites

  • 4 months later...
  • 3 months later...
  • 10 months later...

Notice: Trying to get property of non-object in /var/www/clients/client1/web1/web/classes/stock/StockManager.php on line 1097

Notice: Trying to get property of non-object in /var/www/clients/client1/web1/web/classes/stock/StockManager.php on line 1100

Notice: Trying to get property of non-object in /var/www/clients/client1/web1/web/classes/stock/StockManager.php on line 1103

Notice: Trying to get property of non-object in /var/www/clients/client1/web1/web/classes/stock/StockManager.php on line 1106

Notice: Trying to get property of non-object in /var/www/clients/client1/web1/web/classes/stock/StockManager.php on line 1109

Notice: Trying to get property of non-object in /var/www/clients/client1/web1/web/classes/stock/StockManager.php on line 1112

[PrestaShopException]

Property StockMvt->id_employee is empty
at line 917 in file classes/ObjectModel.php

912. }
913.
914. $message = $this->validateField($field, $this->$field);
915. if ($message !== true) {
916. if ($die) {
917. throw new PrestaShopException($message);
918. }
919. return $error_return ? $message : false;
920. }
921. }
922.

 

 

Hi i have this problem upgradin prestasho from 1.6.0.14 to 1.6.1.16

Thank for your help.

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More