Jump to content

Product comments errors in version 2.8


Recommended Posts

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

  • 2 years later...

[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 by Christian Alias (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...