Error occured page when trying to change an order

Hi, guys!

CS-Cart 2.1.4 MVE.

This error occures periodically when I try to change orders. The blank page with the “Error occured” in the top left corner in the Admin area appears on the last step (4) when trying to save changes to an order.

Looks like there's an attempt to INSERT the record instead of UPDATE.

I'm not ready now to make upgrades.

If the problem is known and solved in the next releases (upgrades), please advise where to make changes to resolve the particular problem.

Database error: Duplicate entry '2173' for key 1 (1062)

Invalid query: INSERT INTO cscart_orders (payment_id, promotions, notes, order_id, discount, total, subtotal, shipping_cost, payment_surcharge, subtotal_discount, company, firstname, lastname, email, phone, url, b_address, b_address_2, b_city, b_country, b_state, b_zipcode, b_phone, s_firstname, s_lastname, s_address, s_address_2, s_city, s_country, s_state, s_zipcode, s_phone, b_firstname, b_lastname, b_title, s_title, title, b_county, s_county, company_id, fax, user_id, timestamp, lang_code, tax_exempt, status, ip_address, is_parent_order, parent_order_id, promotion_ids, shipping_ids) VALUES(…)


File: /var/www/wroot/data/www/

Line: 310

Function: db_error

File: /var/www/wroot/data/www/

Line: 468

Function: db_query

File: /var/www/wroot/data/www/

Line: 266

Function: fn_place_order

File: /var/www/wroot/data/www/

Line: 567

Function: include

File: /var/www/wroot/data/www/

Line: 422

Function: fn_run_controller

File: /var/www/wroot/data/www/

Line: 28

Function: fn_dispatch

If this is happening on an 'edit' (versus a new order or cloning an order) then it's definitely a bug. Please report it to the bug tracker.