Skip to main content

[solved]update to 2.2.3 gives sql error

More
12 years 9 months ago - 12 years 9 months ago #137911 by huuanito
-- url of the page with the problem -- : mywebsite.com/administrator/index.php?op...staller&view=install
-- HikaShop version -- : 1.5.5
-- Joomla version -- : 1.7.0
-- PHP version -- : 5.3.26
-- Browser(s) name and version -- : firefox 25.0.1
-- Error-message(debug-mod must be tuned on) -- : Error_message

In process of updating Joomla to 2.5 tried Updating Hikashop from 1.5.5 to latest 2.2.3 with joomla errors turned on get this error:
Code:
JDatabaseMySQL::query: 1060 - Duplicate column name 'cart_type' SQL=ALTER TABLE `jos_hikashop_cart` ADD `cart_type` varchar(25) NOT NULL DEFAULT 'cart', ADD `cart_name` varchar(50) NOT NULL, ADD `cart_share` varchar(255) NOT NULL DEFAULT 'nobody', ADD `cart_current` INT NOT NULL DEFAULT '0'
Install is being done from install from directory on the site.
Last edit: 12 years 9 months ago by huuanito. Reason: mark solved

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #137912 by huuanito
update: the line it balks at is
administrator/components/com_hikashop/install.hikashop.php:491

looking in the code I see this

486 $this->db->setQuery("ALTER TABLE `#__hikashop_cart` ADD `cart_type` varchar(2 5) NOT NULL DEFAULT 'cart', ".
487 "ADD `cart_name` varchar(50) NOT NULL, ".
488 "ADD `cart_share` varchar(255) NOT NULL DEFAULT 'nobody', ".
489 "ADD `cart_current` INT NOT NULL DEFAULT '0'");
490 $this->db->query();
491 $this->db->query();

It seems odd for that line to be there twice...that would probably cause the issue I'm having.

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago - 12 years 9 months ago #137916 by huuanito
I commented out line 491 and tried over but that gave a new error:
Code:
JDatabaseMySQL::query: 1091 - Can't DROP 'payment_type'; check that column/key exists SQL=ALTER TABLE `jos_hikashop_payment` DROP INDEX payment_type
this time at line 615
Code:
614 $this->db->setQuery("ALTER TABLE `#__hikashop_payment` DROP INDEX payment_type"); 615 $this->db->query();

I then commented out lines 614 and 615 and tried over and voila! it installed.
Last edit: 12 years 9 months ago by huuanito. Reason: correct typo

Please Log in or Create an account to join the conversation.

More
12 years 9 months ago #137920 by Jerome
Hi,

Thanks for your feedback.
We will improve the tests during the updates in order to avoid these SQL problems.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Time to create page: 0.181 seconds
Powered by Kunena Forum