4
Vote

Orchard 1.7 Move taxonomy term Error

description

When using the move comand on the taxonomy term in the dashboard i get this error:

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. at Orchard.Taxonomies.Services.TaxonomyService.<>c__DisplayClass22.<GetChildren>b__21(TermPart x) at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Orchard.Taxonomies.Models.TermPart.Sort(IEnumerable1 terms) at Orchard.Taxonomies.Services.TaxonomyService.GetChildren(TermPart term) at Orchard.Taxonomies.Services.TaxonomyService.MoveTerm(TaxonomyPart taxonomy, TermPart term, TermPart parentTerm) at Orchard.Taxonomies.Controllers.TermAdminController.MoveTerm(Int32 taxonomyId, Int32 selectedTermId, String termIds) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation) at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func1 continuation)

comments

nduarte wrote Aug 7, 2013 at 12:17 AM

Forgot to mention, using orchard 1.7

jhenderson22 wrote Aug 30, 2013 at 12:41 PM

I am also getting this error...

jhenderson22 wrote Sep 2, 2013 at 2:06 AM

Although, I am getting this error while using the taxonomy in a filter for a query...

nduarte wrote Sep 24, 2013 at 9:36 PM

Sebastien,
When i opened this issue, i forgot to mention (actually i found out later) that this only happens when the taxonomy and terms are created in code using the taxonomy and contentManager services, instead of the dashboard.
In my case, i was creating the taxonomy and terms on a FeatureEventHandler of my module.
Hope this helps in the repro of the bug.