Copied to clipboard

Flag this post as spam?

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


  • Mario Lopez 168 posts 952 karma points MVP 3x c-trib
    Mar 02, 2017 @ 00:10
    Mario Lopez
    0

    FormPost crashing

    I have my cart with the buttons to increase/decrease/remove item. If I click any of those buttons quickly TeaCommerce crashes with a response:

    The page cannot be displayed because an internal server error has occurred. So 500 error

    The thing is that this doesn't happen on the Starter Kit.

    Any ideas. Has anyone had this issue before?

  • Anders Burla 2560 posts 8256 karma points
    Mar 02, 2017 @ 12:35
    Anders Burla
    0

    Hi Mario

    Tried to look in the Umbraco log what the server error is? If you are in debug mode and the setting for logging is correct you should be able to see what that server 500 error is giving as output in the log files.

    Kind regards

    Anders

  • Mario Lopez 168 posts 952 karma points MVP 3x c-trib
    Mar 05, 2017 @ 23:29
    Mario Lopez
    0

    Hey Anders, this is the error:

    Violation of PRIMARY KEY constraint 'PKTeaCommerceOrderLinePrice1'. Cannot insert duplicate key in object 'dbo.TeaCommerceOrderLinePrice'. The duplicate key value is (230, 3).

    It looks like it's trying to insert multiples lines at the same time and crashes...?

  • Anders Burla 2560 posts 8256 karma points
    Mar 06, 2017 @ 08:52
    Anders Burla
    0

    Hi Mario

    Are you running the latest Tea Commerce version?

  • Mario Lopez 168 posts 952 karma points MVP 3x c-trib
    Mar 27, 2017 @ 06:02
    Mario Lopez
    0

    Hi Anders,

    Sorry, I missed your response. I had 3.1.4 installed and I just installed 3.2.0. Still getting same problem.

    In addition to that (in case is somehow related), when I press any of the buttons on the cart to add, remove items the values are updated but instead refreshing the same page it goes to the home page. This is an example of one of the forms:

    <form action="/base/TC/FormPost.aspx" method="post">
               <input name="storeId" type="hidden" value="1">
               <input name="AddOrUpdateOrderLine" type="hidden" value="orderLineId : orderLineId, quantity : quantity, overwriteQuantity : overwriteQuantity">
               <input name="overwriteQuantity" type="hidden" value="true">
               <input name="orderLineId" type="hidden" value="@orderLine.Id">
               <input type="text" onblur="this.form.submit()" name="quantity" class="form-control text-center" value="@orderLine.Quantity.ToString( "0.####" )" pattern="[0-9]*" min="1">
    </form>
    
  • Anders Burla 2560 posts 8256 karma points
    Mar 27, 2017 @ 06:37
    Anders Burla
    0

    It's weird that it redirect to the frontpage as the action is set to Tea Commerce API method and it will just redirect back to the same page. Do you have other custom code that might do some of that magic?

  • Mario Lopez 168 posts 952 karma points MVP 3x c-trib
    Mar 27, 2017 @ 21:25
    Mario Lopez
    0

    I have removed all javascript from site, I have even loaded the view on its own, no layout around it and it is still returning to home page. Not sure if it can be of help but when the form is posted the Http Referer is poiting to the home. I have tested the TC Stater Kit and the referer is the current page. No idea why the referer is not my current page...

  • Mario Lopez 168 posts 952 karma points MVP 3x c-trib
    Mar 29, 2017 @ 01:21
    Mario Lopez
    0

    I found the issue with the form returning to the homepage. Somehow this line was on my master template breaking everything :(:

    <meta name="referrer" content="origin">
    

    That issue with the form crashing when clicking multiple times is still happening though.

  • Anders Burla 2560 posts 8256 karma points
    Mar 29, 2017 @ 07:19
    Anders Burla
    0

    So if you click ones it work fine? If you click two times with lets say 5 sec between - does it still work? Is it only if you push multiple times as quickly as you can that you see the bug?

Please Sign in or register to post replies

Write your reply to:

Draft