candyshop Posted May 28, 2012 Share Posted May 28, 2012 (edited) I am getting this message when trying to edit the countries details in the shipping section in the BO An error occurred while updating object. country (Unknown column 'need_identification_number' in 'field list') Any ideas how to fix this? Many thanks in advance Edited May 28, 2012 by candyshop (see edit history) Link to comment Share on other sites More sharing options...
codegrunt Posted May 28, 2012 Share Posted May 28, 2012 What version of Prestashop are you running and have you upgraded previously? From the error it sounds like a column that should be present in the {prefix}_country table in the database is missing. That suggests either a problem with an upgrade or maybe you are using a module from a newer version with an older version (or something of that nature)? Cheers Link to comment Share on other sites More sharing options...
candyshop Posted May 28, 2012 Author Share Posted May 28, 2012 Hi Yes I have recently upgraded. I think its 1.4 Regards, Paul Link to comment Share on other sites More sharing options...
codegrunt Posted May 28, 2012 Share Posted May 28, 2012 Well it sounds like something did not go as expected with the upgrade (are you sure it finished)? First you need to be sure about what *exact* version you are running. When you know that, download the source for that version and extract it on your local machine (not the server). In the "install" directory will be a file called "sql/db.sql". The table in question will be defined in there and should look something like this: CREATE TABLE `PREFIX_country` ( `id_country` int(10) unsigned NOT NULL auto_increment, `id_zone` int(10) unsigned NOT NULL, `id_currency` int(10) unsigned NOT NULL default '0', `iso_code` varchar(3) NOT NULL, `call_prefix` int(10) NOT NULL default '0', `active` tinyint(1) unsigned NOT NULL default '0', `contains_states` tinyint(1) NOT NULL default '0', `need_identification_number` tinyint(1) NOT NULL default '0', `need_zip_code` tinyint(1) NOT NULL default '1', `zip_code_format` varchar(12) NOT NULL default '', `display_tax_label` BOOLEAN NOT NULL, PRIMARY KEY (`id_country`), KEY `country_iso_code` (`iso_code`), KEY `country_` (`id_zone`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; You then need to use a tool like phpMyAdmin to look at the table structure on your server and see if the columns match. My hunch is that they will not and that suggests that something broke during the upgrade or possibly there was a bug in the upgrader. How to fix it this is hard to answer without knowing what all has gone on previously. If the only thing missing is the that one column and everything else in the system is fine then you can fix things by adding the missing column to the table. But if other tables are improperly defined you would be better off restoring your backup and starting the upgrade process afresh keeping a close eye on the process for errors and such to see what is going wrong. You might also want to search the bug database in case this was a known issue with the upgrading. The best case is that this is an isolated issue that can be fixed by adding the missing column manually. You just want to be sure though that there are not bigger issues post upgrade. Cheers 1 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