Ive got a migrated OC 3.0.3.7. In order to migrate old SEO urls Ive done this here:
viewtopic.php?t=205218
So far everything was ok until I wanted to add a new product. When I tried to save the new product I've got HTTP 500 error in admin.
After investigating the problem I found the following in my error log:
Code: Select all
[09-Apr-2021 09:38:52 UTC] PHP Fatal error: Uncaught Exception: Error: Duplicate entry '0' for key 'PRIMARY'<br />Error No: 1062<br />INSERT INTO oc_seo_url SET store_id = '0', language_id = '1', query = 'product_id=158', keyword = 'tesztelunk' in /home/tolokapu/public_html/zednew/system/library/db/mysqli.php:41
Stack trace:
#0 /home/tolokapu/public_html/zednew/system/library/db.php(45): DB\MySQLi->query('INSERT INTO oc_...')
#1 /home/tolokapu/public_html/zednew/admin/model/catalog/product.php(124): DB->query('INSERT INTO oc_...')
#2 /home/tolokapu/public_html/zednew/storage/modification/system/engine/loader.php(248): ModelCatalogProduct->addProduct(Array)
#3 /home/tolokapu/public_html/zednew/system/engine/proxy.php(47): Loader->{closure}(Array, Array)
#4 /home/tolokapu/public_html/zednew/admin/controller/catalog/product.php(23): Proxy->__call('addProduct', Array)
#5 /home/tolokapu/public_html/zednew/storage/modification/system/engine/action.php(79): ControllerCatalogProduct->add()
#6 /home/tolokapu/public_html/zednew/admin/controller/startup/router.ph in /home/tolokapu/public_html/zednew/system/library/db/mysqli.php on line 41
Does anyone know what causes this problem?
Thanks