The error is telling you that is can't insert into the oc_setting table, due to a problem with the primary key. Check the table structure and that the primary key has auto increment set.ru-lefthanded wrote: ↑Mon Mar 24, 2025 8:09 pmSo upgrade to 4.1.0.2 did indeed start now - got as far as doing patch 3 & then came up with
Error: Error: Duplicate entry '0' for key 'oc_setting.PRIMARY'
Error No: 1062
INSERT INTO `oc_setting` SET `key` = 'config_image_default_width', `value` = '300', `code` = 'config', `serialized` = '0', `store_id` = '0'
File: /home/customer/www/xxx/public_html/system/library/db/mysqli.php Line: 122 Backtrace: 0 File: /home/customer/www/xxx/public_html/system/library/db.php Line: 54 Class: Opencart\System\Library\DB\MySQLi Function: query Backtrace: 1 File: /home/customer/www/xxx/public_html/install/controller/upgrade/upgrade_4.php Line: 373 Class: Opencart\System\Library\DB Function: query Backtrace: 2 File: /home/customer/www/xxx/public_html/system/engine/action.php Line: 96 Class: Opencart\Install\Controller\Upgrade\Upgrade4 Function: index Backtrace: 3 File: /home/customer/www/xxx/public_html/system/framework.php Line: 259 Class: Opencart\System\Engine\Action Function: execute Backtrace: 4 File: /home/customer/www/xxx/public_html/install/index.php Line: 42 Function: require_once
Is the "INSERT INTO" telling me what the issue is or how to fix it?? - if the latter, it just reproduced the error! - either way... how do I fix?
Check both your PHP and OpenCart error logs and you web browser's developer console.Hourglasss wrote: ↑Tue Mar 25, 2025 4:27 pmIm having issues updating to latest version to, from Version 4.1.0.0 to 4.1.0.3
it keeps getting stuck at patch 6 out of 11 it also ungrays the continue button for some rreason:
![]()
I guess you've tried pressing it ...
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
they both show nothing about the upgrade , https://github.com/opencart/opencart/pull/14703 they suppose have fixed it with this patch but it still hangs on step 6ADD Creative wrote: ↑Tue Mar 25, 2025 8:24 pmCheck both your PHP and OpenCart error logs and you web browser's developer console.Hourglasss wrote: ↑Tue Mar 25, 2025 4:27 pmIm having issues updating to latest version to, from Version 4.1.0.0 to 4.1.0.3
it keeps getting stuck at patch 6 out of 11 it also ungrays the continue button for some rreason:
![]()
Tried adding the patch above manualy it now works until step 9 but there still some issue's overall cause now it just hangs at step 9 and continue button also ungray's and is clickable
As per attached image, as far as I can see, auto increment is set - unless this needs to be set against a different line??ADD Creative wrote: ↑Tue Mar 25, 2025 8:11 pmThe error is telling you that is can't insert into the oc_setting table, due to a problem with the primary key. Check the table structure and that the primary key has auto increment set.ru-lefthanded wrote: ↑Mon Mar 24, 2025 8:09 pmSo upgrade to 4.1.0.2 did indeed start now - got as far as doing patch 3 & then came up with
Error: Error: Duplicate entry '0' for key 'oc_setting.PRIMARY'
Error No: 1062
INSERT INTO `oc_setting` SET `key` = 'config_image_default_width', `value` = '300', `code` = 'config', `serialized` = '0', `store_id` = '0'
File: /home/customer/www/xxx/public_html/system/library/db/mysqli.php Line: 122 Backtrace: 0 File: /home/customer/www/xxx/public_html/system/library/db.php Line: 54 Class: Opencart\System\Library\DB\MySQLi Function: query Backtrace: 1 File: /home/customer/www/xxx/public_html/install/controller/upgrade/upgrade_4.php Line: 373 Class: Opencart\System\Library\DB Function: query Backtrace: 2 File: /home/customer/www/xxx/public_html/system/engine/action.php Line: 96 Class: Opencart\Install\Controller\Upgrade\Upgrade4 Function: index Backtrace: 3 File: /home/customer/www/xxx/public_html/system/framework.php Line: 259 Class: Opencart\System\Engine\Action Function: execute Backtrace: 4 File: /home/customer/www/xxx/public_html/install/index.php Line: 42 Function: require_once
Is the "INSERT INTO" telling me what the issue is or how to fix it?? - if the latter, it just reproduced the error! - either way... how do I fix?
Check the Next autoindex vale for that table is correct. Check the tables in your database for errors.
All tables check OK but there are some issues with indexes of tables:ADD Creative wrote: ↑Fri Mar 28, 2025 8:51 pmCheck the Next autoindex vale for that table is correct. Check the tables in your database for errors.
Problems with indexes of table `oc_order`
The indexes order_status_id and order_status_id_3 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_3 seem to be equal and one of them could possibly be removed.
The indexes order_status_id and order_status_id_2 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_2 seem to be equal and one of them could possibly be removed.
Problems with indexes of table `oc_order_product`
The indexes product_id and product_id_3 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_4 seem to be equal and one of them could possibly be removed.
The indexes product_id and product_id_2 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_3 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_2 seem to be equal and one of them could possibly be removed.
Problems with indexes of table `oc_order_status`
The indexes language_id and language_id_3 seem to be equal and one of them could possibly be removed.
The indexes order_status_id and order_status_id_3 seem to be equal and one of them could possibly be removed.
The indexes language_id and language_id_2 seem to be equal and one of them could possibly be removed.
The indexes order_status_id and order_status_id_2 seem to be equal and one of them could possibly be removed.
Problems with indexes of table `oc_order_total`
The indexes code and code_3 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_4 seem to be equal and one of them could possibly be removed.
The indexes code and code_2 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_3 seem to be equal and one of them could possibly be removed.
The indexes order_id and order_id_2 seem to be equal and one of them could possibly be removed.
Problems with indexes of table `oc_product`
The indexes product_id and product_id_3 seem to be equal and one of them could possibly be removed.
The indexes product_id and product_id_2 seem to be equal and one of them could possibly be removed.
Also tried running DBCC CHECKDB, mysqlcheck & myisamchk - all found issues at position 0 & one found a couple more - though could not work out what those positions related to
Next autoindex 27,989 - though no idea if this is correct or not!
I don't understand why they don't fix the updating function. I don't have time to manually update everything.
I just end up not updating anything because i'm focused on my sales.
I just end up not updating anything because i'm focused on my sales.
The upgrade in 4.1.0.3 work for me. You would need to restore from a backup before you attempted the upgrade or fix the errors in you database.
Well, at this point you shouldn't really be using OC4 on a live site.oberheimer wrote: ↑Thu Apr 17, 2025 5:51 pmI don't understand why they don't fix the updating function. I don't have time to manually update everything.
I just end up not updating anything because i'm focused on my sales.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: maffe and 2 guests