ventesites Posted September 30, 2014 Share Posted September 30, 2014 Hi Using PS 1.6.9 I have problems with some customers unable to login, my log files show always the same error and it might be related but don't know how to fix the problem: Invalid product vars at line 104 in file classes/Link.php if (!$id_lang) $id_lang = Context::getContext()->language->id; $url = $this->getBaseLink($id_shop).$this->getLangLink($id_lang, null, $id_shop); if (!is_object($product)) { if (is_array($product) && isset($product['id_product'])) $product = new Product($product['id_product'], false, $id_lang, $id_shop); elseif ((int)$product) $product = new Product((int)$product, false, $id_lang, $id_shop); else throw new PrestaShopException('Invalid product vars'); } Only fix i found is already applied in the file Can somebody help me ? Thanks Link to comment Share on other sites More sharing options...
Jhony Ranger Posted November 26, 2014 Share Posted November 26, 2014 Hi Using PS 1.6.9 I have problems with some customers unable to login, my log files show always the same error and it might be related but don't know how to fix the problem: Invalid product vars at line 104 in file classes/Link.php if (!$id_lang) $id_lang = Context::getContext()->language->id; $url = $this->getBaseLink($id_shop).$this->getLangLink($id_lang, null, $id_shop); if (!is_object($product)) { if (is_array($product) && isset($product['id_product'])) $product = new Product($product['id_product'], false, $id_lang, $id_shop); elseif ((int)$product) $product = new Product((int)$product, false, $id_lang, $id_shop); else throw new PrestaShopException('Invalid product vars'); } Only fix i found is already applied in the file Can somebody help me ? Thanks Hi Ventesites, you did solve it? I also have the same problem with the same version. Regards. Link to comment Share on other sites More sharing options...
ventesites Posted November 27, 2014 Author Share Posted November 27, 2014 (edited) no, never received an answer. still have the same error in my log file. I solved lot of problems with a local fresh install on my computer, the template I am using live is a customization from the default_bootstrap. First thing was to go to : http://validator.w3.org/ and check my site, i had some +200 errors, some where mine, some where Prestashop's coding so i did a merge of just about every single file to compare locally between original and customized files and fixed all errors until my site came 100% clean in the validator I deleted all plugins i do not use because even if you don't use them de-installing is not enough, they can conflict with the plugins you need, also some are pretty bad, for example the Facebook plugin create a bunch of 404 with the og:image... I also disabled Ajax another very important stuff i did directly having to do with customer unable to register is a big cleaning here: In your BO "Localization > Countries + click on any country .... I was amazed to discover that zip codes are already configurated a specific way for Prestashop to validate like: NNNNNN for China so, if your customer from China doesn't have 6 numbers in his zip code, he can't register..... To me this should be an option, do we want Prestashop to automatically validate zip codes? and then configurate the stuff if we feel like it but it's the contrary, you must remove every preformated zip code if you want to make sure everybody can register.... On this same page, depending of the country, it can also be configurated to request customer's DNI, tax identification and a bunch of crap that make customer run away..... Those are things you can't see when you test your site but that customers have to deal with.... Hope this help ! Good luck Note : I still have problems but really not as bad as it was. Edited November 27, 2014 by ventesites (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted June 17, 2015 Share Posted June 17, 2015 Sometimes diferent things are the cause of this problem. You might have a look here: https://www.prestashop.com/forums/topic/271232-constant-errors-invalid-product-vars-at-line-108-in-file-classeslinkphp/?do=findComment&comment=1359284 Link to comment Share on other sites More sharing options...
Recommended Posts