Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1461 posts 1883 karma points
    Aug 20, 2012 @ 23:03
    Gordon Saxby
    0

    Nullable object must have a value

    A site has just gone live and we are getting the following error - sometimes:

    System.InvalidOperationException: Nullable object must have a value.     at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)     at TeaCommerce.SessionController.get_CurrentOrder()     at TeaCommerce.Razor.TeaCommerce.GetOrder()

    The code around that area is

    if (this.order == null)
    {
         this.order = TeaCommerce.GetOrder();
    }

    Is there something wrong with that code?

    I only want to do a "GetOrder" if an order does not currently exist (and is stored in "order").

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 20, 2012 @ 23:11
    Gordon Saxby
    0

    (edit doesn't work, so I've replied to myself!)

    The variable "order" is defined as:

            private Order order;

  • Rune Grønkjær 1372 posts 3103 karma points
    Aug 21, 2012 @ 08:17
    Rune Grønkjær
    0

    Hi Gordon,

    Are you using cookies? And an older version than 1.4.3.0? Then that might be the problem --> http://www.teacommerce.net/en/documentation/revision-history.aspx

    /Rune

     

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 21, 2012 @ 10:17
    Gordon Saxby
    0

    Not 100% sure what version is installed ... how do I check?

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Aug 21, 2012 @ 10:30
    Rune Grønkjær
    0

    Hi Gordon,

    Check the "Installed Packages" Tea Commerce should be there and in there the version number.

    /Rune

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 21, 2012 @ 10:49
    Gordon Saxby
    0

    Ah yes ... 1.4.3.0 BETA 2 ... should I try installing the released 1.4.3.0 ?

     

  • Rune Grønkjær 1372 posts 3103 karma points
    Aug 21, 2012 @ 11:08
    Rune Grønkjær
    0

    Yes, do that. See if that fixes it. You haven't had problems with this before?

    /Rune

  • Gordon Saxby 1461 posts 1883 karma points
    Aug 21, 2012 @ 11:31
    Gordon Saxby
    0

    I can't recreate the problem, but the Umbraco log is showing it has happened a few times.

    Should I turn off cookie usage until I am able to update the site?

  • Rune Grønkjær 1372 posts 3103 karma points
    Aug 21, 2012 @ 11:41
    Rune Grønkjær
    0

    Yes, you should do that if you can. Looks very much like the cookie problem, which we have fixed in the latest release.

    /Rune

Please Sign in or register to post replies

Write your reply to:

Draft