[solved]update to 2.2.3 gives sql error

  • Posts: 3
  • Thank you received: 0
10 years 11 months ago #137911

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

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: 10 years 11 months ago by huuanito. Reason: mark solved

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

  • Posts: 3
  • Thank you received: 0
10 years 11 months ago #137912

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.

  • Posts: 3
  • Thank you received: 0
10 years 11 months ago #137916

I commented out line 491 and tried over but that gave a new error:

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
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: 10 years 11 months ago by huuanito. Reason: correct typo

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
10 years 11 months ago #137920

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum