2

Resolved

Error editing Roles 9b1fb4933671

description

Oops. Something went wrong ... sorry

An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back
Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object. in Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options, QueryHints hints) in e:\orchard_e85f787601a5\src\Orchard\ContentManagement\DefaultContentManager.cs:line 207 in Orchard.ContentManagement.DefaultContentManager.Get(Int32 id, VersionOptions options) in e:\orchard_e85f787601a5\src\Orchard\ContentManagement\DefaultContentManager.cs:line 119 in Orchard.ContentManagement.DefaultContentQuery.<Slice>b__2(ContentItemVersionRecord x) in e:\orchard_e85f787601a5\src\Orchard\ContentManagement\DefaultContentQuery.cs:line 164 in System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() in System.Collections.Generic.List1..ctor(IEnumerable1 collection) in System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) in Orchard.Utility.Extensions.ReadOnlyCollectionExtensions.ToReadOnlyCollection[T](IEnumerable1 enumerable) in e:\orchard_e85f787601a5\src\Orchard\Utility\Extensions\ReadOnlyCollectionExtensions.cs:line 8 in Orchard.ContentManagement.DefaultContentQuery.Slice(Int32 skip, Int32 count) in e:\orchard_e85f787601a5\src\Orchard\ContentManagement\DefaultContentQuery.cs:line 162 in Orchard.ContentManagement.DefaultContentQuery.ContentQuery1.Orchard.ContentManagement.IContentQuery<T>.List() in e:\orchard_e85f787601a5\src\Orchard\ContentManagement\DefaultContentQuery.cs:line 212 in Orchard.CustomForms.Permissions.<GetPermissions>d__2.MoveNext() in Orchard.Roles.Services.RoleService.GetInstalledPermissions() in Orchard.Roles.Controllers.AdminController.Edit(Int32 id) in lambda_method(Closure , ControllerBase , Object[] ) in System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) in System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) in System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10() in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) in System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) in System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)

Clone: 9b1fb4933671
Url: http://localhost:30320/OrchardLocal/Admin/Roles/Edit/1

comments

erik_oppedijk wrote May 10, 2013 at 2:37 PM

Got the same error on Widgets, steps to repro:
  • Latest 1.7 build a7a4bfa66799
  • Default install (SQLCompact, Default recipe)
  • Create a Projection query, with only a filter on contenttype=page
  • Create a Projection Widget don't enter a title yet, press SAVE
  • After the error enter a title, press SAVE again
  • now the error appears
If you preview the projection query, it seems to work, so don't press preview

The error on a page is below (the Original error from the poster only appears in the admin site)

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

Line 205:
Line 206: // allocate instance and set record property
Line 207: contentItem = New(versionRecord.ContentItemRecord.ContentType.Name);
Line 208: contentItem.VersionRecord = versionRecord;
Line 209:

Source File: c:\temp\orchard_1.7_a7a4bfa66799\src\Orchard\ContentManagement\DefaultContentManager.cs Line: 207