We are trying to upgrade an existing .NET DD4T 1.31 website to .NET DD4T2.0. We have made necessary changes to compile the Website with latest DD4T 2.0 DLL successfully.
Now I would like to test whether DD4T 2.0 is backward compatible with the previous version DD4T 1.31 - So have not done anything on the CM side apart from installing the latest TBBs (no publish with latest TBBs).
Q: Assuming DD4T 2.0 is backward compatible on CD side, if I am running the website with DD4T 2.0 then calling the @Html.RenderComponentPresentationsByView("viewname")
is giving me below error:
Object reference not set to an instance of an object.
The stack Trace and Event Log error is as below:
[NullReferenceException: Object reference not set to an instance of an object.]
DD4T.Mvc.Html.TridionHelper.RenderComponentPresentations(HtmlHelper helper, String[] byComponentTemplate, String bySchema, IComponentPresentationRenderer renderer) in C:\projects\dd4t-mvc\source\dd4t.mvc\html\TridionHelper.cs:88
.....Campaign_cshtml.Execute() in c:\DD4TUpgrade\CodeBase-TFS\International\Platform\(trimmed)
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
System.Web.WebPages.StartPage.ExecutePageHierarchy() +88
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +106
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +374
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +89
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +186
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +36
System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44
System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +65
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Any help would be appreciated; it might be something minor I am missing.