Strange Duplicate Key Error during cart checkout
While doing some testing on my development machine I added 4 items to my shopping cart and checked out. After entering my payment info and clicking the "Place this order" button, the sfMessage div on the checkout page displayed the following:
The items remain in the cart and after 30 seconds or do the div auto hides itself. If I try to click the "Place this order" button again, the div displays the following message:
Again, the div auto hides 30 seconds or so later and if I try clicking the button again, the process repeats with the first message.
Oddly, I get the "Customer Receipt/Purchase Confirmation" email but not the "Confirming Order nn" email. At this point the cart is in limbo and the only way to submit the order is to empty the cart and start from scratch.
I've had a look at the sf_user_link table (see attached image) and there is only one record and none of the columns contain the 1800978614-e74f77a3-0731-4138-a8cc-5ea40b8458d2 value that the message is complaining about.
The sf_ec_order contains a row that matches the date, time, and dollar amount of the order and has an order_attempts value of 5 which matches the number of times I tried to submit the order that resulted in the messages listed above. So it does look like the order was received. On the ecommerce backend, the order shows as "Authorized".
I'm a little puzzled by the multiple emails. When an order goes through successfully, I get 2 emails. One is titled: "Nashoba Learning Group Customer Receipt/Purchase Confirmation" (see receipt1.png). The other is titled; "Confirming Order NN" (where NN is the actual order number). Is the first email being generated by the payment processor?
The first e-mail shopuld be genereate by the payment processor, since it only outputs emails, but in this case the functionality might encounter a problem.
I have tested the scenario you mentioned and didn`t reproduced the problem.
I am not sure what is causing the products to auto hide after 30 seconds, is this happening every time you purchase ?
Sorry, the products aren't autohiding--the div that displays the exception is autohiding. But the question is why exception occuring and why is the order being added to the orders table if there was in fact a problem?
I am not sure why this is happening I was unable to reproduce it on my project.
To better specify why this error is happening and what is causing it can you test creating two pages with out a template (start from scratch). Place product list widget and shopping cart on one of the pages and checkout on the other page (I am not sure how the ecommerce is setup at your end and so I am only refering to the tree widgets that are needed to setup a shop). Are you getting the same error when taking the same steps to checkout on those pages?
If yes then there should be a problem with the ecommerce module.
I'll try your suggestion but the problem is so sporadic that short of submiting dozens of test orders I doubt I'll be able to duplicate it. And if it doesn't reappear on the new pages it's not really a difinitive test--i might have been one test order away from it happening again.
Has anyone else reported or seen this type of error?