2015-10-07 70 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導入自己定義的圖層。我用備份副本取代了我的數據庫,先導入了圖層,然後再導入窗口小部件再次解決了這個問題。非常感謝你 。祝你今天愉快 !! –