Alexgaw Posted January 18, 2014 Share Posted January 18, 2014 After upgrading to versino 2.8 of Product comments modules i get this error in cPanel error log.: Anyone know what this could be? I run PS 1.5.6.1 with Alysum 2.8 theme. [sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 186[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 186[sat Jan 18 12:20:35 2014] [error] PHP Notice: Undefined index: product in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 186[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 184[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 184[sat Jan 18 12:20:35 2014] [error] PHP Notice: Undefined index: product in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 184[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 181[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 181[sat Jan 18 12:20:35 2014] [error] PHP Notice: Undefined index: product in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 181[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 178[sat Jan 18 12:20:35 2014] [error] PHP Notice: Trying to get property of non-object in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 178[sat Jan 18 12:20:35 2014] [error] PHP Notice: Undefined index: product in /home/public_html/cache/smarty/compile/89/ec/d2/89ecd26d9aed24f04050b5af29672b9bfca0a720.file.productcomments.tpl.php on line 178 Link to comment Share on other sites More sharing options...
Takio Posted January 18, 2014 Share Posted January 18, 2014 HelloIn your Admin, click on the tab "Advanced Parameters", next go to "Cache" (second option) and click on the "Clear Smarty cache & Autoload cache" button.All modules update must work afer this operation CiaoTakio Link to comment Share on other sites More sharing options...
Christian Alias Posted April 18, 2016 Share Posted April 18, 2016 (edited) [sOLVED] I'm having the same issue, but clearing caché doesn't work... When I click write a comment for the first time i get: On the product name: Notice: Trying to get property of non-object in /var/www/vhosts/test2.cutoff.es/httpdocs/cache/smarty/compile/80/a7/73/80a77312a583f708938da7ef9e5d6690f1716edf.file.productcomments.tpl.php on line 194 and on the product description:Notice: Trying to get property of non-object in /var/www/vhosts/test2.cutoff.es/httpdocs/cache/smarty/compile/80/a7/73/80a77312a583f708938da7ef9e5d6690f1716edf.file.productcomments.tpl.php on line 198 Any solution for this ? I've prestaashop 1.6.0.14 and module updated thanks in advance! EDIT ---------- I've found a solution for this: On productcomments.php inside the function: public function hookProductTabContent($params) I changed the following line: $product = new Product((int)Tools::getValue('id_product'), false, $this->context->language->id); with this one: $product = $this->context->controller->getProduct(); Because of the error I thought about a cache problem. hope it helps! Edited April 18, 2016 by Christian Alias (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts