Shopping Cart - Object reference not set to an instance of an object.
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) +4838Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272Similar 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
Hi Steve,
May be this can help you.
Hi Steve,
Hi Tarun,
That pointed me in the right direction.
Thanks--Steve
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) +2496Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272sorry - i just created a new page and put the shopping cart on it and it is working fine now.
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,