Jump to content

[SOLVED] Help! Cannot Create Tax Rules - Bad SQL query Unknown column 'a.deleted' in 'where clause'


Recommended Posts

When I try to access the tax rules page, I immediately get this error message:

 

  • Bad SQL query
    Unknown column 'a.deleted' in 'where clause'

 

What can I do to fix this? Obviously a major issue!! The shop is a brand new installation, version 1.6.0.11

 

Thanks!

 

Furthermore, I also cannot install a localisation pack - just gives me an error message 

 

This tax rule cannot be saved.

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

Hi intandem,

 

Look at your mysql table ps_tax_rules_group

 

Is there a 'deleted' column in it ?

 

Here under you will find how your table must look.

 

Did you make a fresh install or an upgrade from 1.4 or 1.5 ?

 

Tell us more.

 

Good luck

 

 

CREATE TABLE IF NOT EXISTS `ps_tax_rules_group` (
  `id_tax_rules_group` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `active` int(11) NOT NULL,
  `deleted` tinyint(1) unsigned NOT NULL,
  `date_add` datetime NOT NULL,
  `date_upd` datetime NOT NULL,
  PRIMARY KEY (`id_tax_rules_group`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;
 
Link to comment
Share on other sites

Ok, I think we might have figured out the cause of this!! Earlier, we had experienced another database issue where I wasn't able to add a specific price assigned to a customer group to a product. Based on this forum post https://www.prestashop.com/forums/topic/423906-an-error-occurred-while-updating-the-specific-price/ we noticed that some tables were missing in our database and added them which fixed that issue. In it, the person mentioned that they had a 1.6.0.11 installation but used a 1.6.0.9 database.

 

Ours is a clean 1.6.0.11 installation. No upgrades, no imported databased. However, I just heard from my developer that he used the PS Cleaner module right after installation. 1.0.6.11 had only just come out, so I assume the module not yet was compatible with that newest Prestashop version and during the cleaning job it removed the missing tables. Have replaced them and all back to normal. Phew!!

 

Thanks for the suggestions and help!

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

  • 5 months later...

this may be happening from people who got a templatemonster theme and loaded the sample data.  It brings an entire database replacement with a 1.6.0.9 database so if your fileset is 1.6.0.14 for example you will see strange errors like this.  i.6.0.9 IS missing this field in that table.  So this customer is right as to the source of the error, it is not prestashop it is template monster.

Link to comment
Share on other sites

  • 3 months later...
  • 5 years later...

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...