Duplicate Primary on Import

  • Posts: 8
  • Thank you received: 0
5 years 4 months ago #300781

-- HikaShop version -- : 4.0.0
-- Joomla version -- : 3.9.0
-- PHP version -- : 7.2.1
-- Error-message(debug-mod must be tuned on) --

An error has occurred.
1062 Duplicate entry '27' for key 'PRIMARY'	
/home/spasso5/public_html/libraries/joomla/database/driver/mysqli.php:661
Call stack
#	Function	Location
1	()	JROOT/libraries/joomla/database/driver/mysqli.php:661
2	JDatabaseDriverMysqli->execute()	JROOT/administrator/components/com_hikashop/helpers/import/openc.php:851
3	hikashopImportopencHelper->importCategories()	JROOT/administrator/components/com_hikashop/helpers/import/openc.php:172
4	hikashopImportopencHelper->doImport()	JROOT/administrator/components/com_hikashop/helpers/import/openc.php:61
5	hikashopImportopencHelper->importFromOpenc()	JROOT/administrator/components/com_hikashop/controllers/import.php:160
6	ImportController->_opencart()	JROOT/administrator/components/com_hikashop/controllers/import.php:106
7	ImportController->import()	JROOT/libraries/src/MVC/Controller/BaseController.php:710
8	Joomla\CMS\MVC\Controller\BaseController->execute()	JROOT/administrator/components/com_hikashop/helpers/helper.php:1854
9	hikashopController->execute()	JROOT/administrator/components/com_hikashop/hikashop.php:72
10	require_once()	JROOT/libraries/src/Component/ComponentHelper.php:402
11	Joomla\CMS\Component\ComponentHelper::executeComponent()	JROOT/libraries/src/Component/ComponentHelper.php:377
12	Joomla\CMS\Component\ComponentHelper::renderComponent()	JROOT/libraries/src/Application/AdministratorApplication.php:101
13	Joomla\CMS\Application\AdministratorApplication->dispatch()	JROOT/libraries/src/Application/AdministratorApplication.php:159
14	Joomla\CMS\Application\AdministratorApplication->doExecute()	JROOT/libraries/src/Application/CMSApplication.php:196
15	Joomla\CMS\Application\CMSApplication->execute()	JROOT/administrator/index.php:51

Whenever I try to import from Opencart 3.0.2 I am getting this error, It will upload some categories but no subcategories and no products or images.

Last edit: 5 years 4 months ago by Jerome. Reason: [code] is nice

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
5 years 4 months ago #300808

Hello,

It looks like that you have the same issue than in that thread (where the user did not confirm that the patch fixed the issue, so the patch might not be integrated into HikaShop)
www.hikashop.com/forum/import-export-csv...g-from-opencart.html

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.

  • Posts: 8
  • Thank you received: 0
5 years 4 months ago #300811

Hi

That is line 508?

1062 Duplicate entry '62' for key 'PRIMARY'?

It seems to be creating a strange loop where it imports the main categories then tries to import the main categories under the main ones again and again eventually creating a BIGINT database error.

If i go to delete the categories:

An error has occurred.
1690 BIGINT UNSIGNED value is out of range in '(`spasso5_seosnap`.`#__hikashop_category`.`category_left` - 2)'

Last edit: 5 years 4 months ago by shank8888. Reason: added information

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
5 years 4 months ago #300835

Hello,

The bigint issue is because there is no more category, so the "category_left" is consider to be "0" and if you remove 2, you got a negative value (which is a problem when it has to contain only positive values).
You should not delete the core categories.

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.058 seconds
Powered by Kunena Forum