mohd_adli Posted September 1, 2012 Share Posted September 1, 2012 Hi all, I have done upgrade PS from 1.4.6.0 to 1.4.9.0 manually. But I have this problem : Your shop version is now 1.4.9.0 Unfortunately, 2 SQL errors have occurred. I don't know why this happen & I need help & guide how to solve this problem. Your help with many thanks. Regards, Adli Link to comment Share on other sites More sharing options...
bellini13 Posted September 1, 2012 Share Posted September 1, 2012 did you view the log to determine what the 2 errors were? sometimes they are just warnings because of duplicates. Link to comment Share on other sites More sharing options...
oka Posted September 2, 2012 Share Posted September 2, 2012 (edited) I have 1 sql error, if you see the log you can know what's going on. Mine was ALTER TABLE `ps_category_product` DROP INDEX `category_product_index`, ADD PRIMARY KEY (`id_category`, `id_product`) [u](1091) Can't DROP 'category_product_index'; check that column/key exists[/u] So I delete all occurrences : delete from ps_category_product where id_product = 5718 and id_category = 220 limit 1; delete from ps_category_product where id_product = 5717 and id_category = 220 limit 1; . . . And Then i can change it: ALTER TABLE `ps_category_product` ADD PRIMARY KEY (`id_category`, `id_product`); Regards. Edited September 2, 2012 by oka (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted September 2, 2012 Share Posted September 2, 2012 @oka, that was likely a safe error to ignore. it tried to drop an index that did not exist "category_product_index", and then replace it with a new primary key. I'm not sure why you deleted 2 rows in that table, but changing the alter table command as you did was the correct action. Link to comment Share on other sites More sharing options...
oka Posted September 2, 2012 Share Posted September 2, 2012 Hello. My explanation above is missing a few details.... When I do the ALTER TABLE statement to add the primary key it fails because there are duplicate entries. I can't modify the table until i delete all duplicates. Regards. Link to comment Share on other sites More sharing options...
bellini13 Posted September 2, 2012 Share Posted September 2, 2012 ah I see, yes agreed, thanks for the extra clarity. Link to comment Share on other sites More sharing options...
oka Posted September 3, 2012 Share Posted September 3, 2012 Hi. PrestaShop team has released a patch that will be included in SVN http://forge.prestashop.com/browse/PSCFI-6423 Regards. Link to comment Share on other sites More sharing options...
mohd_adli Posted September 3, 2012 Author Share Posted September 3, 2012 Hi all, Why my appear like this? Anything wrong with prestashop or mistake from my site. Please refer here http://www.belibukuonline.com.my. All products position, left & right block, categories & header not as normal position. Please help me & guide me guys. Link to comment Share on other sites More sharing options...
itcwebman Posted September 5, 2012 Share Posted September 5, 2012 Hello, I also have some errors, could someone comment on them? My knowledge of SQL is a bit limited SET NAMES 'utf8' /* PHP:category_product_index_unique(); */ CREATE TABLE IF NOT EXISTS `ps_order_tax` ( `id_order` int(11) NOT NULL, `tax_name` varchar(40) NOT NULL, `tax_rate` decimal(6,3) NOT NULL, `amount` decimal(20,6) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 INSERT INTO `ps_hook` (`name`, `title`, `description`, `position`, `live_edit`) VALUES ('frontCanonicalRedirect', 'Front Canonical Redirect', 'Check for 404 errors before canonical redirects', 0, 0) (1062) Duplicate entry 'frontCanonicalRedirect' for key 'hook_name' /* PHP:update_module_pagesnotfound(); */ ALTER TABLE `ps_order_state` ADD COLUMN `deleted` tinyint(1) UNSIGNED NOT NULL default '0' AFTER `delivery` (1060) Duplicate column name 'deleted' SET NAMES 'utf8' SET NAMES 'utf8' SET NAMES 'utf8' SET NAMES 'utf8' ALTER TABLE `ps_feature_product` ADD INDEX `id_product`(`id_product`) (1061) Duplicate key name 'id_product' SET NAMES 'utf8' SET NAMES 'utf8' SET NAMES 'utf8' SET NAMES 'utf8' ALTER TABLE `ps_image` ADD UNIQUE KEY `idx_product_image` (`id_image` , `id_product` , `cover`) (1061) Duplicate key name 'idx_product_image' ALTER TABLE `ps_category_product` DROP INDEX `category_product_index`, ADD PRIMARY KEY (`id_category`, `id_product`) (1068) Multiple primary key defined ALTER TABLE `ps_cms_category_lang` DROP INDEX `category_lang_index`, ADD PRIMARY KEY (`id_cms_category`, `id_lang`) (1091) Can't DROP 'category_lang_index'; check that column/key exists ALTER TABLE `ps_order_tax` ADD `id_order_tax` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST (1060) Duplicate column name 'id_order_tax' ALTER TABLE `ps_feature_lang` ADD INDEX feature_name (`id_lang`, `name`) (1061) Duplicate key name 'feature_name' ALTER TABLE `ps_state` ADD INDEX statename (`name`) (1061) Duplicate key name 'statename' ALTER TABLE `ps_category` ADD INDEX nleftrightactive (`nleft`, `nright`, `active`) (1061) Duplicate key name 'nleftrightactive' ALTER TABLE `ps_category` ADD INDEX level_depth (`level_depth`) (1061) Duplicate key name 'level_depth' ALTER TABLE `ps_category` ADD INDEX nright (`nright`) (1061) Duplicate key name 'nright' ALTER TABLE `ps_category` ADD INDEX nleft (`nleft`) (1061) Duplicate key name 'nleft' ALTER TABLE `ps_specific_price` ADD INDEX from_quantity (`from_quantity`) (1061) Duplicate key name 'from_quantity' ALTER TABLE `ps_product` ADD INDEX indexed (`indexed`) (1061) Duplicate key name 'indexed' UPDATE `ps_country` SET `zip_code_format` = 'NNNNN' WHERE `iso_code` = 'MC' LIMIT 1 UPDATE `ps_county_zip_code` SET `to_zip_code` = `from_zip_code` WHERE `to_zip_code` = 0 UPDATE `ps_configuration` SET `value` = 0 WHERE `name` = 'PS_HIGH_HTML_THEME_COMPRESSION' LIMIT 1 INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`)(SELECT 'PS_TAX_DISPLAY_ALL', `value`, NOW(), NOW() FROM `ps_configuration` WHERE name = 'PS_TAX_DISPLAY' LIMIT 1) (1062) Duplicate entry 'PS_TAX_DISPLAY_ALL' for key 'name' DELETE FROM `ps_referrer_cache` WHERE id_referrer NOT IN (SELECT id_referrer FROM `ps_referrer`) /* PHP:update_module_mailalerts(); */ /* PHP:update_module_blocklayered(); */ Link to comment Share on other sites More sharing options...
bellini13 Posted September 5, 2012 Share Posted September 5, 2012 the errors seem harmless, alot of duplicate warnings, which means the changes had already been applied. Had you tried to upgrade previously? Or perhaps hired a developer to enhance the site? 1 Link to comment Share on other sites More sharing options...
itcwebman Posted September 5, 2012 Share Posted September 5, 2012 Thanks for the reply. I had tried to upgrade to 1.4.9 already from 1.4.8.2 but it failed, so this was me trying again. The site seems ok apart from this: http://www.prestashop.com/forums/topic/185865-major-error-after-upgrade-to-149/ Link to comment Share on other sites More sharing options...
bellini13 Posted September 6, 2012 Share Posted September 6, 2012 in the future always take backups of your database before making changes. when it failed the first time, you should have restored the database from backup. in any event, if those were the only errors you received then I would say they are safe to ignore. Link to comment Share on other sites More sharing options...
benjamin utterback Posted September 6, 2012 Share Posted September 6, 2012 Hello all, this thread had multiple users with errors, thank you bellini13 for your help as always. However, mohd_adli, have you solved your original problem? Thank you for choosing PrestaShop! 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