"Object reference not set to an instance of an object" error

Sep 11, 2012 at 1:39 PM

I have installed and enabled the Mechanics modules, but when I go to "Content" in my admin menu, I get a "Object reference not set to an instance of an object" error at <h2>@Html.ItemDisplayLink(title, contentItem)</h2>

I'd appreciate any help to get this error nailed down. Here is the entire page:

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:

Line 4:      string title = Model.Title.ToString();
Line 5:  }
Line 6:  <h2>@Html.ItemDisplayLink(title, contentItem)</h2>

Source File: c:\inetpub\wwwroot\Modules\Downplay.Mechanics\Views\Parts.Title.Summary.cshtml    Line: 6

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Orchard.Mvc.Html.ContentItemExtensions.ItemDisplayLink(HtmlHelper html, String linkText, IContent content) in c:\Build\Orchard\src\Orchard\Mvc\Html\ContentItemExtensions.cs:21
   ASP._Page_Modules_Downplay_Mechanics_Views_Parts_Title_Summary_cshtml.Execute() in c:\inetpub\wwwroot\Modules\Downplay.Mechanics\Views\Parts.Title.Summary.cshtml:6
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +102
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +172
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +146
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:131
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:118
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:175
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
   ClaySharp.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
   Orchard.Core.Shapes.CoreShapes.ContentZone(Object Display, Object Shape, TextWriter Output) in c:\Build\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:248

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +640
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs:65
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
   ClaySharp.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +975
   ASP._Page_Core_Contents_Views_Content_SummaryAdmin_cshtml.Execute() in c:\inetpub\wwwroot\Core\Contents\Views\Content.SummaryAdmin.cshtml:13
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +147
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:137
   Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:118
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
   ClaySharp.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +975
   Orchard.Core.Shapes.<>c__DisplayClass14a.<List>b__147(Object item) in c:\Build\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:617
   System.Linq.WhereSelectListIterator`2.MoveNext() +232
   System.Linq.WhereEnumerableIterator`1.MoveNext() +196
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +472
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   Orchard.Core.Shapes.CoreShapes.List(Object Display, TextWriter Output, IEnumerable`1 Items, String Tag, String Id, IEnumerable`1 Classes, IDictionary`2 Attributes, IEnumerable`1 ItemClasses, IDictionary`2 ItemAttributes) in c:\Build\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:617

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +640
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
   Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs:65
   Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
   Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
   Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:71
   ClaySharp.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:29
   ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:13
   System.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +975
   ASP._Page_Core_Contents_Views_admin_List_cshtml.Execute() in c:\inetpub\wwwroot\Core\Contents\Views\Admin\List.cshtml:45
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +103
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +173
   Orchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in c:\Build\Orchard\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:60
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() +33
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   Orchard.Mvc.Routes.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in c:\Build\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:147
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375


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

<!-- [NullReferenceException]: Object reference not set to an instance of an object. at Orchard.Mvc.Html.ContentItemExtensions.ItemDisplayLink(HtmlHelper html, String linkText, IContent content) in c:\Build\Orchard\src\Orchard\Mvc\Html\ContentItemExtensions.cs:line 21 at ASP._Page_Modules_Downplay_Mechanics_Views_Parts_Title_Summary_cshtml.Execute() in c:\inetpub\wwwroot\Modules\Downplay.Mechanics\Views\Parts.Title.Summary.cshtml:line 6 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:line 131 at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.<>c__DisplayClass26.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:line 118 at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:line 55 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 175 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 88 at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:line 71 at ClaySharp.ClayBehaviorCollection.<>c__DisplayClass14.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 29 at ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 13 at Orchard.Core.Shapes.CoreShapes.ContentZone(Object Display, Object Shape, TextWriter Output) in c:\Build\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:line 248 [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs:line 65 at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:line 55 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 179 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 88 at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:line 71 at ClaySharp.ClayBehaviorCollection.<>c__DisplayClass14.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 29 at ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 13 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at ASP._Page_Core_Contents_Views_Content_SummaryAdmin_cshtml.Execute() in c:\inetpub\wwwroot\Core\Contents\Views\Content.SummaryAdmin.cshtml:line 13 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:line 137 at Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.<>c__DisplayClass26.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:line 118 at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:line 55 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 179 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 88 at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:line 71 at ClaySharp.ClayBehaviorCollection.<>c__DisplayClass14.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 29 at ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 13 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Orchard.Core.Shapes.CoreShapes.<>c__DisplayClass14a.<List>b__147(Object item) in c:\Build\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:line 617 at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Orchard.Core.Shapes.CoreShapes.List(Object Display, TextWriter Output, IEnumerable`1 Items, String Tag, String Id, IEnumerable`1 Classes, IDictionary`2 Attributes, IEnumerable`1 ItemClasses, IDictionary`2 ItemAttributes) in c:\Build\Orchard\src\Orchard.Web\Core\Shapes\CoreShapes.cs:line 617 [TargetInvocationException]: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Orchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAttributeStrategy\ShapeAttributeBindingStrategy.cs:line 65 at Orchard.DisplayManagement.Descriptors.ShapeAlterationBuilder.<>c__DisplayClass3.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\Build\Orchard\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:line 55 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 179 at Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:line 88 at Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\Build\Orchard\src\Orchard\DisplayManagement\Implementation\DisplayHelper.cs:line 71 at ClaySharp.ClayBehaviorCollection.<>c__DisplayClass14.<>c__DisplayClass16.<InvokeMember>b__13() in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 29 at ClaySharp.ClayBehaviorCollection.Execute(Func`1 proceed, Func`3 linker) in C:\Users\sebros\My Projects\Clay\src\ClaySharp\ClayBehaviorCollection.cs:line 13 at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at ASP._Page_Core_Contents_Views_admin_List_cshtml.Execute() in c:\inetpub\wwwroot\Core\Contents\Views\Admin\List.cshtml:line 45 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at Orchard.Mvc.ViewEngines.ThemeAwareness.LayoutAwareViewEngine.<>c__DisplayClass7.<FindView>b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in c:\Build\Orchard\src\Orchard\Mvc\ViewEngines\ThemeAwareness\LayoutAwareViewEngine.cs:line 60 at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19() at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler.EndProcessRequest(IAsyncResult result) in c:\Build\Orchard\src\Orchard\Mvc\Routes\ShellRoute.cs:line 147 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --><!-- This error page might contain sensitive information because ASP.NET is configured to show verbose error messages using <customErrors mode="Off"/>. Consider using <customErrors mode="On"/> or <customErrors mode="RemoteOnly"/> in production environments.-->

Server Error in '/' Application.

Object reference not set to an instance of an object.

 


Sep 11, 2012 at 1:40 PM

Just also noticed this occurs on any page that is a list. Hopefully someone can tell me what is wrong.

Jan 7, 2013 at 2:20 PM

i have the same issue. Wanted to use science for creating N-N relations in my project.

May 12, 2013 at 7:54 PM
Glad to see how active this thread is >_>. We've got the same issue in Orchard v.1.6.