+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / Shopping Cart - Object reference not set to an instance of an object.

Shopping Cart - Object reference not set to an instance of an object.

8 posts, 0 answered
  1. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    19 Jun 2012
    Link to this post
    Hi,
    I upgraded sitefinity 4.4 to 5.0. I have changed all manual settings which are described in sitefinity upgrade document. But still I am getting an error on Shopping cart control.
    Please see below for more details.
    Server Error in '/' Application.
     
    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.]
       Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.ShoppingCart.AttachEventsToCouponCodeControl(CouponCodeEntryView couponCodeEntryView) +62
       Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.ShoppingCart.InitializeControls(GenericContainer container) +1803
       Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +89
       System.Web.UI.Control.EnsureChildControls() +162
       System.Web.UI.Control.PreRenderRecursiveInternal() +120
       System.Web.UI.Control.PreRenderRecursiveInternal() +307
       System.Web.UI.Control.PreRenderRecursiveInternal() +307
       System.Web.UI.Control.PreRenderRecursiveInternal() +307
       System.Web.UI.Control.PreRenderRecursiveInternal() +307
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4838
     
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


    Thanks,
    Tarun

  2. SteveV
    SteveV avatar
    178 posts
    Registered:
    06 Nov 2011
    21 Jun 2012
    Link to this post
    Similar problem.  Just upgraded from 4.4 to the latest 5.x version.  After adding an item to the shopping cart, attempting to view the cart results in the following exception:
     

    Server Error in '/NLGSitefinityWebApp' Application.

    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.] Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.ShoppingCart.InitializeControls(GenericContainer container) +1452 Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +81 System.Web.UI.Control.EnsureChildControls() +181 System.Web.UI.Control.PreRenderRecursiveInternal() +59 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Control.PreRenderRecursiveInternal() +221 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4200 


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272


    I just got done wasting a day wrestling with a stupid OpenAccess.targets issue and now this.  I'm now rounding the corner on 2 full days trying to get this site "upgraded" on my development machine.

    Steve


  3. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    21 Jun 2012
    Link to this post
    Hi Steve,

    May be this can help you.

    I fixed it. In sitefinity 5x up-gradation some issue with CheckOut  Default templates.... that does not upgradated. So I created a fresh sitefinity 5x project and used Checkout's default template to my server app,just copy and paste and I found my issue fixed.

    Thanks,
    Tarun
  4. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    21 Jun 2012
    Link to this post
    Hi Steve,

    Sorry, I lead you to wrong move. Actually previous solution was related to Checkout control...may be you need that later. But for you current issue. You need to replace one line in default template of Shopping Cart control.
    New line:
     <orders:couponcodeentryview id="couponCodeEntryView" runat="server" /> 

    Old line:
     <orders:couponcodeentryview runat="server" />

    Thanks,
    Tarun
  5. SteveV
    SteveV avatar
    178 posts
    Registered:
    06 Nov 2011
    22 Jun 2012
    Link to this post
    Hi Tarun,

    That pointed me in the right direction.

    Thanks--Steve
  6. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    18 Jul 2012
    Link to this post
    Did everything work out here? I am getting the same error. Specifically the one below, after an upgrade to 5.1.   I have restored the template for the shopping as well.

    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.]
       Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.ShoppingCart.InitializeControls(GenericContainer container) +1685
       Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +58
       System.Web.UI.Control.EnsureChildControls() +102
       System.Web.UI.Control.PreRenderRecursiveInternal() +42
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
     
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
  7. Laura
    Laura avatar
    311 posts
    Registered:
    25 Feb 2008
    18 Jul 2012
    Link to this post
    sorry - i just created a new page and put the shopping cart on it and it is working fine now.
  8. Grace Hallwachs
    Grace Hallwachs avatar
    144 posts
    Registered:
    03 Nov 2014
    19 Jul 2012
    Link to this post
    Hi,

    This is a known issue with the 5.1 upgrade. I have included a link to a KB article which explains how to resolve the issue with the shopping cart template.

    Greetings,
    Grace Hallwachs
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
8 posts, 0 answered