dhurley Posted September 6, 2016 Share Posted September 6, 2016 I have discovered that any product that has been removed from our catalog is creating a 500 error on the page where that product used to be. Causing our errors in webmaster tools to jump up. Here's the error: Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 353 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 354 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 355 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 634 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 635 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 357 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 649 Notice: Trying to get property of non-object in ***/modules/yotpo/yotpo.php on line 359 [PrestaShopException]Invalid product varsat line 106 in file classes/Link.php In addition to this problem I would prefer that these missing products send the user to the standard 404 page not the "product not found" page. Thanks for your help guys! Link to comment Share on other sites More sharing options...
rocky Posted September 8, 2016 Share Posted September 8, 2016 It seems to be related to the yopto module. I'm not familiar with that module, but I guess it's not validating the product IDs before calling the Link class. I suggest editing the module and using code like the following to validate the product ID: $product = new Product($id_product); if (Validate::isLoadedObject($product)) { // Execute code that's causing the notice } 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