DD_DD2 Posted December 5, 2016 Share Posted December 5, 2016 Hi, On PS 1.7.0.2, after setting smtp parameters and clicking on Save, I've got this error: " ContextErrorException in AdminEmailsController.php line 84: Notice: Trying to get property of non-object" the lines are foreach (Contact::getContacts($this->context->language->id) as $contact) { $arr[] = array('email_message' => $contact['id_contact'], 'name' => $contact['name']); } It appears that $this->context is NULL ! Does anyone know more about that ? Link to comment Share on other sites More sharing options...
jeroen80 Posted January 24, 2017 Share Posted January 24, 2017 Same issue @1.7.0.4 Link to comment Share on other sites More sharing options...
DD_DD2 Posted January 25, 2017 Author Share Posted January 25, 2017 Thanks for the information. Is there anybody from Prestashop who is aware about that ? Link to comment Share on other sites More sharing options...
jeroen80 Posted February 3, 2017 Share Posted February 3, 2017 Issue/bug found: set log email back to yes. Phpmyadmin: ps_configuration > PS_LOG_EMAILS > Change value 0 to 1 Link to comment Share on other sites More sharing options...
DD_DD2 Posted February 3, 2017 Author Share Posted February 3, 2017 Thanks jeroen80 ! Or if you don't w Link to comment Share on other sites More sharing options...
DD_DD2 Posted February 3, 2017 Author Share Posted February 3, 2017 Thanks jeroen80 ! Or if you don't want to log emails, - keep the parameter to 0 (ps_configuration > PS_LOG_EMAILS) - change the controllers/admin/AdminEmailsController.php. The issue is the line 46 parent::__construct(); which is included into the test if (Configuration::get('PS_LOG_EMAILS')) { ! So write the parent::__construct(); instruction just before the if, like this : public function __construct() { $this->bootstrap = true; parent::__construct(); if (Configuration::get('PS_LOG_EMAILS')) { $this->table = 'mail'; $this->className = 'Mail'; $this->lang = false; $this->noLink = true; $this->list_no_link = true; $this->explicitSelect = true; $this->addRowAction('delete'); // parent::__construct(); Hope Prestashop team is listen to us to include it in the next update ! Link to comment Share on other sites More sharing options...
Nagrad Posted May 31, 2022 Share Posted May 31, 2022 Le 03/02/2017 à 6:46 PM, DD_DD2 a dit : Thanks jeroen80 ! Or if you don't want to log emails, - keep the parameter to 0 (ps_configuration > PS_LOG_EMAILS) - change the controllers/admin/AdminEmailsController.php. The issue is the line 46 parent::__construct(); which is included into the test if (Configuration::get('PS_LOG_EMAILS')) { ! So write the parent::__construct(); instruction just before the if, like this : public function __construct() { $this->bootstrap = true; parent::__construct(); if (Configuration::get('PS_LOG_EMAILS')) { $this->table = 'mail'; $this->className = 'Mail'; $this->lang = false; $this->noLink = true; $this->list_no_link = true; $this->explicitSelect = true; $this->addRowAction('delete'); // parent::__construct(); Hope Prestashop team is listen to us to include it in the next update ! thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now