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:


Line 5:      // uputstva content
Line 6:      ContentItem item = dh.QueryItem("Article", "video-learning", setAsCurrentItem: true);
Line 7:      item.QueryReferencedImages();
Line 8:      item.QueryReferencedVideos();
Line 9:  }

Source File: c:\Web\mcms4\Cms_Data\Sites\PucajOdPosla\Templates\Views\Content.VideoLearning\template.cshtml    Line: 7

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP._Page_Cms_Data_Sites_PucajOdPosla_Templates_Views_Content_VideoLearning_template_cshtml.Execute() in c:\Web\mcms4\Cms_Data\Sites\PucajOdPosla\Templates\Views\Content.VideoLearning\template.cshtml:7
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +251
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +146
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +121
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderViewInternal(HtmlHelper htmlHelper, String viewPath, ViewDataDictionary viewData, Object model) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:98
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderView(HtmlHelper htmlHelper, Page_Context pageContext, String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:66
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:395
   Kooboo.CMS.Sites.View.<>c__DisplayClass28_0.<RenderView>b__0() in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:221
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(ViewPosition viewPosition) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:245
   Kooboo.CMS.Sites.View.<RenderPositionContents>d__24.MoveNext() in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:159
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +158
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +93
   Kooboo.CMS.Sites.View.FrontHtmlHelper.Position(String positionID, Func`1 defaultContentFunc) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:124
   ASP._Page_Cms_Data_Sites_PucajOdPosla_Templates_Views_Data_template_cshtml.Execute() in c:\Web\mcms4\Cms_Data\Sites\PucajOdPosla\Templates\Views\Data\template.cshtml:22
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderViewInternal(HtmlHelper htmlHelper, String viewPath, ViewDataDictionary viewData, Object model) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:122
   Kooboo.CMS.Sites.View.PositionRender.ViewRender.RenderView(HtmlHelper htmlHelper, Page_Context pageContext, String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\PositionRender\ViewRender.cs:66
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData, Object parameters, Boolean executeDataRule) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:395
   Kooboo.CMS.Sites.View.FrontHtmlHelper.RenderView(String viewName, ViewDataDictionary viewData) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\View\FrontHtmlHelper.cs:382
   ASP._Page_Cms_Data_Sites_PucajOdPosla_Templates_Layouts_Default_template_cshtml.Execute() in c:\Web\mcms4\Cms_Data\Sites\PucajOdPosla\Templates\Layouts\Default\template.cshtml:3
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +147
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +378
   Kooboo.CMS.Sites.Controllers.PageControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) in D:\WEB\kooboo4_source\Kooboo.CMS\Kooboo.CMS.Sites\Controllers\PageControllerActionInvoker.cs:29
   System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +31
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +448
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +659
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +42
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +73
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +59
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +44
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +25
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +59
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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