Jump to content

Bad SQL query after upgrade


Recommended Posts

I'm getting an error whenever I click the product tab in my BO.

Bad SQL query
Unknown column 'i.id_product' in 'on clause'

 

i'm getting an error when I click CMS in preferences in BO

Category cannot be loaded

 

Searched for solutions on the forum and I've tried this

"In the database, check if cms_category_lang has an id_shop column. If not, add it as int(12)"

and this

"add the column to cms_lang as well"

 

But it still doesn't work.

 

My pages on my website go to "Page not found" pages, my products won't show up.

 

Can someone tell me what I need to do to fix this? Thanks.

Link to comment
Share on other sites

Upgrade from which version to which one ?

 

You are using non-native modules/theme ? If yes disable all overrides and modules by setting on back-office tab: "advanced parameters -> performance -> Debug Modus - > disable non prestashop modules = YES, Disable overrides = YES

 

For major version upgrades I suggest always deinstall or disable in the configuration of 1-click-module all non native things you've installed (also the theme if you are not sure that this is compatible with the version you are upgrading to).

Link to comment
Share on other sites

Upgrade from which version to which one ?

 

You are using non-native modules/theme ? If yes disable all overrides and modules by setting on back-office tab: "advanced parameters -> performance -> Debug Modus - > disable non prestashop modules = YES, Disable overrides = YES

 

For major version upgrades I suggest always deinstall or disable in the configuration of 1-click-module all non native things you've installed (also the theme if you are not sure that this is compatible with the version you are upgrading to).

 

I disabled the two items. This allowed me to click the links to go to my category pages on my shop, but no products are showing. And in the BO the product tab still gives me the Bad SQL error

Link to comment
Share on other sites

It seems that the upgrade failled. It is possible for you to use the rollback, or did you disabled this future on the 1-click-module ?

 

Do you have any back-up of database and FTP from the version before ? If yes yo should back-up them. Bad SQL queries can have several reason, it is difficult to say what happened, but it is at least a database problem. BTW, which php-version are you using ? It could be a problem with old php-versions too. For Prestashop 1.6. you should use at least php 5.3 or best 5.4.

 

From my experience: The next time, before you upgrade, please disable all foreign/non-native addons (modules, themes). Prestashop latest versions are very special case during upgrade when foreign things were installed (specially non verified free addons).

Edited by selectshop.at (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...