This project is read-only.

Error coming while accesing Content on dashboard

Topics: Administration
Oct 7, 2015 at 11:44 PM
Edited Oct 7, 2015 at 11:47 PM
I am working on core installation of orchard v1.9.1.0
Every time I click on Contents on the left side of orchard dashboard, the following error is coming mentioned above.
I got stuck here, Can anyone help me on this.
The error is -

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 8: <fieldset>
Line 9: @Html.LabelFor(widget => widget.LayerId, T("Layer"))
Line 10: @Html.DropDownListFor(widget => widget.LayerId, new SelectList(Model.AvailableLayers, "Id", "Name"))
Line 11: <span class="hint">@T("The Layer where the Widget will be rendered.")</span>
Line 12: </fieldset>

Source File: c:\sites\Modules\Orchard.Widgets\Views\EditorTemplates\Parts.Widgets.WidgetPart.cshtml Line: 10

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
Orchard.Widgets.Models.WidgetPart.get_LayerId() +52

[TargetInvocationException: Property accessor 'LayerId' on object 'Orchard.Widgets.Models.WidgetPart' threw the following exception:'Object reference not set to an instance of an object.']
System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +8526439
System.Web.Mvc.ViewDataInfo.get_Value() +24
System.Web.Mvc.Html.SelectExtensions.SelectInternal(HtmlHelper htmlHelper, ModelMetadata metadata, String optionLabel, String name, IEnumerable1 selectList, Boolean allowMultiple, IDictionary2 htmlAttributes) +338
Oct 8, 2015 at 7:52 AM
This can happen if your widget somehow has lost its Common Part. Make sure it is still attached to your Widget type
Oct 13, 2015 at 9:59 PM
You mean that i have to check all the widgets in Content types have their Common Part attached to it ?
I have already checked that and everything looks fine.
Oct 14, 2015 at 7:56 AM
Than it might be that it's expecting a certain layer, which doesn't exist on your installation.