Post by Nordikota » Thu Sep 19, 2019 1:13 am

OC 3.0.3.2, Journal 3, PHP7.1

When I try to edit or save a product, I get an error similar to below.

I've tried adding AI to the oc_product_advertise_google table. It seems to work for 3 products and then the error re-appears.
I've tried deleting the table & re-building. Same error appears after 2 or 3 product saves.

Googling the error comes up with the 2 ways to fix. I've tried them both and no success. Is there anything else I can try?

Code: Select all

Fatal error: Uncaught Exception: Error: Duplicate entry '85473' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO oc_product_option_value SET product_option_value_id = '85473', product_option_id = '12279', product_id = '1552', option_id = '283', option_value_id = '6432', quantity = '0', subtract = '0', price = '0', price_prefix = '+', points = '0', points_prefix = '+', weight = '0', weight_prefix = '+' in 
system/library/db/mysqli.php:40 Stack trace: #0 storage/modification/system/library/db.php(58): DB\MySQLi->query('INSERT INTO oc_...') 
#1 storage/modification/admin/model/catalog/product.php(286): DB->query('INSERT INTO oc_...') 
#2 storage/modification/system/engine/loader.php(256): ModelCatalogProduct->editProduct('1552', Array) 
#3 system/engine/proxy.php(47): Loader->{closure}(Array, Array) 
#4 storage/modification/admin in system/library/db/mysqli.php on line 40

Active Member

Posts

Joined
Tue Feb 11, 2014 8:04 pm

Post by rjcalifornia » Thu Sep 19, 2019 2:42 pm

Nordikota wrote:
Thu Sep 19, 2019 1:13 am
OC 3.0.3.2, Journal 3, PHP7.1

When I try to edit or save a product, I get an error similar to below.

I've tried adding AI to the oc_product_advertise_google table. It seems to work for 3 products and then the error re-appears.
I've tried deleting the table & re-building. Same error appears after 2 or 3 product saves.

Googling the error comes up with the 2 ways to fix. I've tried them both and no success. Is there anything else I can try?

Code: Select all

Fatal error: Uncaught Exception: Error: Duplicate entry '85473' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO oc_product_option_value SET product_option_value_id = '85473', product_option_id = '12279', product_id = '1552', option_id = '283', option_value_id = '6432', quantity = '0', subtract = '0', price = '0', price_prefix = '+', points = '0', points_prefix = '+', weight = '0', weight_prefix = '+' in 
system/library/db/mysqli.php:40 Stack trace: #0 storage/modification/system/library/db.php(58): DB\MySQLi->query('INSERT INTO oc_...') 
#1 storage/modification/admin/model/catalog/product.php(286): DB->query('INSERT INTO oc_...') 
#2 storage/modification/system/engine/loader.php(256): ModelCatalogProduct->editProduct('1552', Array) 
#3 system/engine/proxy.php(47): Loader->{closure}(Array, Array) 
#4 storage/modification/admin in system/library/db/mysqli.php on line 40
Which fixes did you try? Change the auto increment to the id?

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by Nordikota » Thu Sep 19, 2019 4:58 pm

I've tried adding AI to the oc_product_advertise_google table. It seems to work for 3 products and then the error re-appears.

I've tried deleting the table & re-building. Same error appears after 2 or 3 product saves.

Active Member

Posts

Joined
Tue Feb 11, 2014 8:04 pm

Post by paulfeakins » Thu Sep 19, 2019 5:08 pm

Nordikota wrote:
Thu Sep 19, 2019 4:58 pm
I've tried adding AI to the oc_product_advertise_google table. It seems to work for 3 products and then the error re-appears.
And do the IDs seem to be incrementing correctly?

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


User avatar
Legendary Member
Online

Posts

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

Post by Nordikota » Thu Sep 19, 2019 6:19 pm

Where do I find those to check?

The "oc_product_advertise_google" table is empty

Active Member

Posts

Joined
Tue Feb 11, 2014 8:04 pm

Post by rjcalifornia » Fri Sep 20, 2019 9:11 am

Nordikota wrote:
Thu Sep 19, 2019 6:19 pm
Where do I find those to check?

The "oc_product_advertise_google" table is empty
Use phpMyAdmin to view the database of your OpenCart store, and then check if the ID is incrementing correctly

Image
A2 Hosting features: Shared Turbo Boost, Managed Warp 1, Unmanaged Hyper 1, and Warp 2 Turbo


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by letxobnav » Fri Sep 20, 2019 10:52 am

the error is on the oc_product_option_value table not the oc_product_advertise_google table.
Does anybody read error messages nowadays?

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by Nordikota » Fri Sep 20, 2019 1:52 pm

I did see that, but when I searched for the error the only fix mentioned was to the other table

Active Member

Posts

Joined
Tue Feb 11, 2014 8:04 pm
Who is online

Users browsing this forum: No registered users and 17 guests