Post by ADD Creative » Tue Mar 25, 2025 8:11 pm

ru-lefthanded wrote:
Mon Mar 24, 2025 8:09 pm
So 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?
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.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ADD Creative » Tue Mar 25, 2025 8:24 pm

Hourglasss wrote:
Tue Mar 25, 2025 4:27 pm
Im 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:

Image
Check both your PHP and OpenCart error logs and you web browser's developer console.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Tue Mar 25, 2025 8:26 pm

Hourglasss wrote:
Tue Mar 25, 2025 4:27 pm
it also ungrays the continue button
I guess you've tried pressing it ...

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by Hourglasss » Wed Mar 26, 2025 3:39 am

ADD Creative wrote:
Tue Mar 25, 2025 8:24 pm
Hourglasss wrote:
Tue Mar 25, 2025 4:27 pm
Im 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:

Image
Check both your PHP and OpenCart error logs and you web browser's developer console.
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 6

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by Hourglasss » Wed Mar 26, 2025 3:56 am

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

Active Member

Posts

Joined
Mon Jan 23, 2023 10:39 pm

Post by ru-lefthanded » Fri Mar 28, 2025 7:05 pm

ADD Creative wrote:
Tue Mar 25, 2025 8:11 pm
ru-lefthanded wrote:
Mon Mar 24, 2025 8:09 pm
So 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?
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.
As per attached image, as far as I can see, auto increment is set - unless this needs to be set against a different line??

Attachments

???
settings_issue.png

New member

Posts

Joined
Tue Sep 03, 2013 3:39 am

Post by ADD Creative » Fri Mar 28, 2025 8:51 pm

Check the Next autoindex vale for that table is correct. Check the tables in your database for errors.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by ru-lefthanded » Sat Mar 29, 2025 12:14 am

ADD Creative wrote:
Fri Mar 28, 2025 8:51 pm
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:
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!

New member

Posts

Joined
Tue Sep 03, 2013 3:39 am

Post by ADD Creative » Sat Mar 29, 2025 12:40 am

Do you have a backup you can restore from and check?

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by oberheimer » Thu Apr 17, 2025 5:51 pm

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.

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am

Post by ADD Creative » Thu Apr 17, 2025 6:13 pm

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.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by paulfeakins » Thu Apr 17, 2025 6:44 pm

oberheimer wrote:
Thu Apr 17, 2025 5:51 pm
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.
Well, at this point you shouldn't really be using OC4 on a live site.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: maffe and 2 guests