0

如果我单击管理仪表板中的用户链接,我会收到此错误。

传入字典的模型项的类型为“ShapeProxy2f6cb7cf1318421da23ef1f9d1ea66bf”,但该字典需要类型为“System.Collections.Generic.Dictionary`2[System.String,System.DateTime]”的模型项。

Line 21: 
Line 22:     Model.Metadata.Type = "Pager_Links";
Line 23:     IHtmlString pagerLinks = Display(Model);
Line 24: 
Line 25:     Model.Classes.Add("selector");

源文件:\Themes\TheAdmin\Views\Pager.cshtml 行:23

我在堆栈跟踪中看到对 C:\Users\sebros\My Projects\Clay... 的引用,那是什么?

[InvalidOperationException: The model item passed into the dictionary is of type 'ShapeProxy2f6cb7cf1318421da23ef1f9d1ea66bf', 
but this dictionary requires a model item of type 'System.Collections.Generic.Dictionary`2[System.String,System.DateTime]'.]
System.Web.Mvc.ViewDataDictionary`1.SetModel(Object value) +381
System.Web.Mvc.ViewDataDictionary..ctor(ViewDataDictionary dictionary) +692
System.Web.Mvc.WebViewPage`1.SetViewData(ViewDataDictionary viewData) +74
System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +139
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:\orchard-1.4\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:137
Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in c:\orchard-1.4\src\Orchard\DisplayManagement\Descriptors\ShapeTemplateStrategy\ShapeTemplateBindingStrategy.cs:118
Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in c:\orchard-1.4\src\Orchard\DisplayManagement\Descriptors\ShapeAlterationBuilder.cs:55
Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in c:\orchard-1.4\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:179
Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in c:\orchard-1.4\src\Orchard\DisplayManagement\Implementation\DefaultDisplayManager.cs:88
Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in c:\orchard-1.4\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.Pager_Links(Object Shape, Object Display, HtmlHelper Html, Int32 Page, Int32 PageSize, Double TotalItemCount, Nullable`1 Quantity, Object FirstText, Object PreviousText, Object NextText, Object LastText, Object GapText, String PagerId) in c:\orchard-1.4\src\Orchard.Web\Core\Shapes\CoreShapes.cs:500
4

0 回答 0