2015-10-07 68 views
0

虽然mporting的内容/元数据从果园CMS 1.9.1更早版本1.7,每当我出口的小工具,有抛出一个错误如下所示:如何导入小工具|果园CMS

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. 

Source Error: 


Line 20:     @if (count > 0) { 
Line 21:      int i = 0; 
Line 22:      foreach (WidgetPart widget in widgets.Where(w => w.Zone == zone).OrderBy(w => w.Position, new Orchard.UI.FlatPositionComparer())) { 
Line 23:       <li class="[email protected](widget.LayerId == Model.CurrentLayer.Id ? "this" : "other")-layer [email protected]@(i == 0 ? " first" : (i == count ? " last" : ""))"> 
Line 24:        @using (Html.BeginFormAntiForgeryPost()) { 


Source File: e:\inetpub\wwwroot\TestWebsite\Modules\Orchard.Widgets\Views\WidgetPlacement.Zones.cshtml Line: 22 

每当我出口任何我的小部件这个错误发生。你能帮我理解导出Widgets的步骤吗?在导出Widgets之前还需要导出哪些内容?

回答

1

它可能是从1.9.1的出口不兼容1.7,你必须比较你的出口从1.9.1和出口从1.7,看看有什么不同。

或者,您可以将窗口小部件导入到一个尚不存在的图层上,这在加载窗口小部件管理页面时也会引发错误。

+0

Ooo有道理。我没有检查图层的事情。 PLease在线。我真的需要一些帮助。我正在检查你说的层点。稍后将更新10-15分钟。 –

+0

你是对的层问题。我错过了为我的Widgets导入自己定义的图层。我用备份副本取代了我的数据库,先导入了图层,然后再导入窗口小部件再次解决了这个问题。非常感谢你 。祝你今天愉快 !! –