Ultim8pc 0 Posted February 11 (edited) So, I've just built a new Cubecart site. When you go through the checkout process, everything works as expected and you can successfully make your payment (I'm using Braintree). However, no order is created, but the customers details are all present/created within the 'customer list'. Interrogating the customer details shows no orders. I have noticed that when this occurs there is a entry in the error log which seems to indicate that it's not writing the order details into the database: File: [order.class.php] Line: [1350] "INSERT INTO `cc_CubeCart_order_summary` (`cart_order_id.....LOTS OF DATA RELATED TO ORDER .....');" - Duplicate entry '' for key 'custom_oid_2' I also note that even though the customer has successfully paid there is no corresponding entry in the 'transaction logs'/// I would appreciate any help or thoughts on this.. Thanks in advance. Edited February 11 by Ultim8pc Error Share this post Link to post Share on other sites
havenswift-hosting 169 Posted February 11 What version of CubeCart have you used to build this site ? There were problems with the custom order ID when it was first released but fixes were added but the fact the key is called “custom_oid_2” indicates you may also have database issues Share this post Link to post Share on other sites
Ultim8pc 0 Posted February 11 Running v6.2.2. I built and configured the site and then tested it. All working OK. Gone live and now have the order issue. Share this post Link to post Share on other sites
bsmither 1,284 Posted February 11 In the table CubeCart_order_summary, there should be a column with the name of "custom_oid" (that recently had its characteristics changed to solve a 'duplicate key' problem). If there is a different column with the name of "custom_oid_2", then it is either mistakenly added, or added for some other purpose. If this other column "custom_oid_2" copied the characteristics of "custom_oid" before "custom_oid" got fixed, then "custom_oid_2", as well, will have 'duplicate key' problems. Please verify that CubeCart_order_summary has a column "custom_oid" (see: https://github.com/cubecart/v6/issues/1987). Also, if "custom_oid_2" is present verify that there is an actual requirement for it, and that it has the same characteristics as "custom_oid". Share this post Link to post Share on other sites
bsmither 1,284 Posted February 11 Research shows that the "custom_oid" fix for the 'duplicate key' problem will not appear until CC623. Please review: https://forums.cubecart.com/topic/54311-new-orders-not-showing-in-the-order-section/ Share this post Link to post Share on other sites
Ultim8pc 0 Posted February 11 Bsmither, Thanks, I'll try the ALTER TABLE `CubeCart_order_summary` CHANGE `custom_oid` `custom_oid` VARCHAR(50) NULL DEFAULT NULL;' fix and let you know. Just to add that I am puzzled as to how this has happened... Anyway, the custom_oid column is present in the CubeCart_order_summary table. There is no custom_oid2 column. Share this post Link to post Share on other sites
bsmither 1,284 Posted February 11 It could be the case that the database engine was told to create a key/index called 'custom_oid' when there was already a key/index by that name. (Not referring to a column, but an index against that column.) If that was the case (create a KEY when a KEY already exists), then the database engine could have created a second KEY called 'custom_oid_2' instead of issuing a warning or a failure message. (Doing this may be a database engine configuration setting.) So, yes, the column "custom_oid_2" may very well not exist, but there could be a second KEY by that name. If so, then delete that second KEY having the name "custom_oid_2". Share this post Link to post Share on other sites
Ultim8pc 0 Posted February 12 I understand what you're saying, but why would that database issue occur on a site which has never been modified from stock, uses two basic plug-ins (Braintree and All in one shipping), has never had any code modifications and never had any database operations other than that Cubecart carries out.. I have to say that in my 12 months or so of running Cubecart, I have found it to be exceedingly problematic.. I have used other platforms previously and had no where near as many problems. Share this post Link to post Share on other sites