Jump to content

Invalid product vars at line 174 in file classes/Link.php since upgrade to 1.7.8.2


stevell

Recommended Posts

Hi,

My error exception log is continuously filling with the following message. I cannot identify what is causing the error. It has started on two websites since the upgrade but doesn't appear to be causing any issues.  

*ERROR*     v1.7.8.2    2022/01/05 - 21:55:23: Invalid product vars at line 174 in file classes/Link.php
*ERROR*     v1.7.8.2    2022/01/05 - 21:56:27: Invalid product vars at line 174 in file classes/Link.php
*ERROR*     v1.7.8.2    2022/01/05 - 21:56:31: Invalid product vars at line 174 in file classes/Link.php
*ERROR*     v1.7.8.2    2022/01/05 - 21:56:41: Invalid product vars at line 174 in file classes/Link.php
*ERROR*     v1.7.8.2    2022/01/05 - 21:56:44: Invalid product vars at line 174 in file classes/Link.php

I checked the Route to category = {categories:/}{rewrite} which is unchanged for years. I have Pretty URLs installed.

Any ideas?

Steve

Link to comment
Share on other sites

  • 2 months later...

I had this issue with Pretty URLs too (don't know if it is the source of the issue, because we migrated too)

What I did to solve this issue is going to "Shop settings" > "Trafic and SEO" (sorry if it's not the exact terms, I'm translating from French) and simply save again the settings under "URLs settings", where you set prestashop URL rewrite :

image.thumb.png.cce2a963c05ab3fe71c422a17269aa5f.png

 

That was it for me, hope this helps.

 

  • Like 1
Link to comment
Share on other sites

After the upgrade, not all old modules may work properly.
If a module used override, it may not be compatible with the new version of Prestashop.
You can also cause this problem by using an upgrade module, of which there are many, but they have many bugs.
So I personally do not recommend upgrading from 1.6 to 1.7 any module, but use a clean installation and only then import data from the old version of Prestashop.
It is necessary to realize that each new version of Prestashop also has database updates, for example some tables are deleted and some are added.

80% of module programmers make the mistake of not updating their module for the new version of Prestashop.
It writes into the module from which version of Prestashop the module will work, but does not write exactly into which version its module will work, but writes the general condition that it is always compatible with the current version of Prestashop. And there are problems in the world.

 

E.g.

https://devdocs.prestashop.com/1.7/modules/creation/tutorial/

if (!defined('_PS_VERSION_')) { exit; }

....

....

...

BAD

$this->ps_versions_compliancy = array('min' => '1.6.0.1', 'max' => _PS_VERSION_)

 

OK

$this->ps_versions_compliancy = array('min' => '1.6.0.1', 'max' => '1.6.1.24')

Edited by knacky (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...