-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sitecoreservice.getitem Not returning children items #438
Comments
Hi Do you have the model? The mostly likely cause is that the property is miss the virtual keyword, e.g:
|
Yes I'm using virtual keyword, but getting this error: "((Castle.Proxies.IGlassModelProxy)_target).Chlidren error CS0234: The type or namespace name 'IGlassModelProxy' does not exist in the namespace 'Castle.Proxies' (are you missing an assembly reference?) namespace GlassMapper_POC
} |
Do you ahve the full stacktrace? |
I need the full stack |
" at GlassMapper_POC.ControllerGlass.test()\r\n at ASP._Page_GlassPOC_GetItems_cshtml.Execute()\r\n at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()\r\n at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()\r\n at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)\r\n at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)\r\n at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)\r\n at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)\r\n at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)\r\n at (Object , Object )\r\n at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)\r\n at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)\r\n at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)\r\n at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)\r\n at Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args)\r\n at (Object , Object )\r\n at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)\r\n at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)\r\n at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)\r\n at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)\r\n at Sitecore.Mvc.Helpers.SitecoreHelper.RenderPlaceholderCore(String placeholderName, TextWriter writer)\r\n at Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName)\r\n at ASP._Page_GlassPOC_Layout_cshtml.Execute()\r\n at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()\r\n at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()\r\n at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)\r\n at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)\r\n at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)\r\n at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)\r\n at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args)\r\n at (Object , Object )\r\n at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)\r\n at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)\r\n at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)\r\n at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)\r\n at Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer)\r\n at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)\r\n at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList |
Please let me know if this help. |
I'm having this same issue. Has this been resolved? (Or am I doing something incorrectly?) |
I'm currently upgrading to GlassMapper V5, sitecoreservice.getitem Not returning children items for Glass.Mapper.Sc.101 & Sitecore 10.0.1
var TemplateID = Guid.Parse("{51A26CD4-FCB5-4A3C-8720-2D60F625A678}");
var _Options = new GetItemByIdOptions(TemplateID)
{
InferType = true,
Lazy = Glass.Mapper.LazyLoading.Enabled
};
var target = context.SitecoreService.GetItem(_Options);
The text was updated successfully, but these errors were encountered: