Copied to clipboard

Flag this post as spam?

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


  • René 327 posts 852 karma points
    Sep 01, 2014 @ 08:08
    René
    0

    The request data must have a field name="storeId" and it must have a value

    Hi 

    I have build a shop and it is almoast finished. Now i get this error. The request data must have a field name="storeId" and it must have a value

    What am i missing here? 

    This is from the AddOrUpdateOrderLine

    <form action="/base/TC/FormPost.aspx" method="post" class="ajaxForm"> <input name="AddOrUpdateOrderLine" type="hidden" value="productIdentifier : productIdentifier, orderLineId : orderLineId, quantity : quantity, propertyKeys : propertyKeys, properties" /> <input name="storeId" type="hidden" value="1" /> <input name="properties" value="color" type="hidden" />

    This is where i get the id in the master

    <script type="text/javascript">
      _storeId = 1;
     
      </script>

    Both of the above is a copy of the source code

    This is from the console Postform.aspx

    AddOrUpdateOrderLine   productIdentifier : productIdentifier, orderLineId : orderLineId, quantity : quantity, propertyKeys : propertyKeys, properties
    color   Marineblå
    productIdentifier   6282
    properties  color
    quantity    4
    storeId 1

    René 

  • Anders Burla 2560 posts 8256 karma points
    Sep 01, 2014 @ 10:55
    Anders Burla
    0

    Hi Rene

    When does this happen? What API method do you execute?

    Kind regards
    Anders

  • René 327 posts 852 karma points
    Sep 01, 2014 @ 11:00
    René
    0

    Hi 

    When i use HTML AddOrUpdateOrderLine

     

     

    Here is the source from the console 

    AddOrUpdateOrderLine=productIdentifier+%3A+productIdentifier%2C++orderLineId+%3A+orderLineId%2C+quantity+%3A+quantity%2C+propertyKeys+%3A+propertyKeys%2C+properties&storeId=1&properties=color&productIdentifier=6282&color=Marinebl%C3%A5&quantity=4

    Here is the complete error message

    <error><![CDATA[MESSAGE: Destinationen for en aktivering udløste en undtagelse.  STACKTRACE:  ved System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  ved System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)  ved System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  ved Umbraco.Web.BaseRest.RestExtensionMethodInfo.Invoke(String[] parameters)  INNEREXCEPTION: System.Exception: The request data must have a field name="storeId" and it must have a value  ved TeaCommerce.Api.Web.FormPostHandler.FormPost()  ved TeaCommerce.Umbraco.Web.RestExtensions.FormPost()]]></error>

    René 

  • René 327 posts 852 karma points
    Sep 01, 2014 @ 11:14
    René
    0

    Hi Anders

    I found out why

    For some reason file was missing in the bin Infralution.Licensing.dll

    And i had made a redirect from non www to www. 

    That is why it not worked. 

    But why cant cant i make a redirect?

    <add name="wwwrewrite"
            virtualUrl="http://shop.local/(.*)"
            rewriteUrlParameter="ExcludeFromClientQueryString"
            destinationUrl="http://www.shop.local/$1"
    redirect="Domain" redirectMode="Permanent" ignoreCase="true"/>
  • Anders Burla 2560 posts 8256 karma points
    Sep 01, 2014 @ 11:18
    Anders Burla
    0

    Why dont you make this kind of redirect in the web.config? If you have Url rewrite installed on the IIS you can do it there. Then it will rewrite before Umbraco gets the request which could be the problem here.

    Kind regards
    Anders

  • René 327 posts 852 karma points
    Sep 01, 2014 @ 11:20
    René
    0

    HI Anders 

    Good question.. I will figure it out.

    Tanks

    René  

Please Sign in or register to post replies

Write your reply to:

Draft