x First time here? Check out the FAQ

Come work for Umbraco - The Umbraco HQ are hiring Project managers, .NET developers and DevOps people!

  • Avatar464posts727karma

    Possible bug with multiple domains

    Paul Blair started this topic February 14, 2012 @ 01:04, Go directly to the topic solution

    Hi,

    I have found the following bug when doing some testing (against a PayPal sandbox account):

    User makes purchase though http://www.testsiteö.com

    Logon to backend URL using http://www.testsiteo.com/umbraco/umbraco.aspx#teacommerce (i.e. using "o" instead of "ö")

    Try and view an order:

    Object reference not set to an instance of an object.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [NullReferenceException: Object reference not set to an instance of an object.]
       TeaCommerce.WebShop.Integration.LicenseExtension.OrderController_OrderChanged(Order order) +204
       TeaCommerce.Data.Order.Save() +9577
       TeaCommerce.Admin.Umbraco.plugins.TeaCommerce.Orders.EditOrder.DoPaymentProviderAction(Func`3 callback) +467
       TeaCommerce.Admin.Umbraco.plugins.TeaCommerce.Orders.EditOrder.OnLoad(EventArgs e) +147
       System.Web.UI.Control.LoadRecursive() +70
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3047
    

    If I view the order using the same URL as was used for purchasing then there is no problem.

    teaCommerce: v1.4.1.2 / Umbraco 4.7

    Cheers

    Paul



  • Avatar1947posts5542karma
    Comment with ID: 107876
    Anders Burla Johansen posted this reply February 14, 2012 @ 09:27

    Hi Paul

    Did you use the Tea Commerce starter kit or have you built the site from scratch? The TeaCommerce.WebShop.Integration.LicenseExtension reminds me about or own license shop - but we dont ship that code with the starter kit. So maybe you copied some code where there is a bug somewhere in the License Extension method.

    Kind regards
    Anders


  • Avatar464posts727karma
    Comment with ID: 107896
    Paul Blair posted this reply February 14, 2012 @ 11:04

    Hi,

    I installed the package Tea-Commerce-1.4.1.2-for-.NET-4

    I have copied some fo the code from the starter kit to this solution but have not actually installed the package there. I do trap the order changed event in my own code but don't expect this to be hit when viewing the order in the backend...?

    Thanks

    Paul


  • Anders Burla Johansen posted this reply February 14, 2012 @ 01:09

    Hi Paul

    The reason why your order changed event is hit is because Tea Commerce automatically has the payment provider for the order do a GetStatus call. This might have changed since the order was process at the callback. So your order might change and thats why the event is raised. But it looks like its something in your code that is making an exception.

    Kind regards
    Anders


  • Avatar464posts727karma
    Comment with ID: 107999
    Paul Blair posted this reply February 14, 2012 @ 09:04

    Thanks Anders,

    The fact that it was working in 1 domain was throwing me off. I was doing a call to getCurrentMember which would only return an object for the domain that was logged onto. I had also done a quick copy-and-paste from the demo site which didn't help with my debugging - I will update my namespaces now!

    Cheers
    Paul


Please login or Sign up To post replies