Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Vineeth 71 posts 291 karma points
    May 07, 2019 @ 09:35
    Vineeth
    0

    Teacommerce Form post error

    Getting this form post error while submitting a tea commerce HTML API form submit not always but sometimes. Any idea on this and please let me know ?

    Log data :

    FormPost error --- Form data: -- storeId = "2" -- returnUrl = "/de/shop/cart-content/information/" -- AddOrUpdateOrderProperties = "properties" -- properties = "countryId,cvrNumber,isValidCvrNumber" -- countryId = "DK" -- cvrNumber = "DK33756445" -- isValidCvrNumber = "true"

    System.Data.SqlServerCe.SqlCeException (0x80004005): A duplicate value cannot be inserted into a unique index. [ Table name = TeaCommerceOrderLinePrice,Constraint name = PKTeaCommerceOrderLinePrice1 ] at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand(CommandBehavior behavior, String method, ResultSetOptions options) at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() at TeaCommerce.Api.Persistence.Database.Insert(String tableName, String primaryKeyName, Boolean autoIncrement, Object poco) at TeaCommerce.Api.Persistence.Database.Insert(Object poco) at TeaCommerce.Api.Persistence.Repositories.OrderRepository.SaveOrderLines(Database database, Guid orderId, OrderLineCollection orderLines, Nullable1 parentOrderLineId) at TeaCommerce.Api.Persistence.Repositories.OrderRepository.Save(Order order) at TeaCommerce.Api.Models.Order.Save() at TeaCommerce.Api.Web.TeaCommerceHelper.AddOrUpdateOrderProperties(Int64 storeId, IDictionary2 properties) at TeaCommerce.Api.Web.FormPostHandler.AddOrUpdateOrderProperties(Int64 storeId, IDictionary2 formFields, IDictionary2 settings) at TeaCommerce.Api.Web.FormPostHandler.FormPost()

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 08, 2019 @ 06:37
    Matt Brailsford
    0

    Hi Vineeth,

    What payment provider is this using?

    Ultimately it appears like something is trying to save 2 order lines prices with the same ID into the database. My immediate thought would be that someone might have double submitted the payment form causing it attempt to save the same value twice. If this is the case, maybe adding some JS on the front end to prevent the submit button from being pressed again could help?

    Hope this helps

    Matt

  • Vineeth 71 posts 291 karma points
    May 08, 2019 @ 07:07
    Vineeth
    0

    The payment provider is QuickPay10.But I can't see any double submission. This error also occurs in AddOrUpdateOrderProperties form submit.I will double check for any double submit occurs

    Thanks

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 08, 2019 @ 07:40
    Matt Brailsford
    0

    Just for some more information, the PK_TeaCommerce_OrderLinePrice_1 primary key that it says is in violation is a composite primary key on OrderLineId and CurrencyId, so something is attempting to save multiple values with the same keys.

Please Sign in or register to post replies

Write your reply to:

Draft