{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5501","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5501/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5501/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5501/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/5501","id":94385234,"number":5501,"title":"Translation of widget with LocalizationPart throws System.NullReferenceException: Object reference not set to an instance of an object.","user":{"login":"loshuliveros","id":12932336,"avatar_url":"https://avatars.githubusercontent.com/u/12932336?v=3","gravatar_id":"","url":"https://api.github.com/users/loshuliveros","html_url":"https://github.com/loshuliveros","followers_url":"https://api.github.com/users/loshuliveros/followers","following_url":"https://api.github.com/users/loshuliveros/following{/other_user}","gists_url":"https://api.github.com/users/loshuliveros/gists{/gist_id}","starred_url":"https://api.github.com/users/loshuliveros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loshuliveros/subscriptions","organizations_url":"https://api.github.com/users/loshuliveros/orgs","repos_url":"https://api.github.com/users/loshuliveros/repos","events_url":"https://api.github.com/users/loshuliveros/events{/privacy}","received_events_url":"https://api.github.com/users/loshuliveros/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-10T20:28:05Z","updated_at":"2015-07-11T04:01:34Z","closed_at":null,"body":"I use clean installation of Orchard 1.9.1\r\n\r\nLine 8:\r\nLine 9: @Html.LabelFor(widget => widget.LayerId, T(\"Layer\"))\r\nLine 10: @Html.DropDownListFor(widget => widget.LayerId, new SelectList(Model.AvailableLayers, \"Id\", \"Name\"))\r\nLine 11: @T(\"The Layer where the Widget will be rendered.\")\r\nLine 12:\r\nSource File: src\\Orchard.Web\\Modules\\Orchard.Widgets\\Views\\EditorTemplates\\Parts.Widgets.WidgetPart.cshtml Line: 10\r\n\r\n[NullReferenceException: Object reference not set to an instance of an object.]\r\nOrchard.Widgets.Models.WidgetPart.get_LayerId() +128\r\n\r\n[TargetInvocationException: Property accessor 'LayerId' on object 'Orchard.Widgets.Models.WidgetPart' threw the following exception:'Object reference not set to an instance of an object.']\r\nSystem.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +525\r\nSystem.Web.Mvc.ViewDataInfo.get_Value() +34\r\nSystem.Web.Mvc.Html.SelectExtensions.SelectInternal(HtmlHelper htmlHelper, ModelMetadata metadata, String optionLabel, String name, IEnumerable1 selectList, Boolean allowMultiple, IDictionary2 htmlAttributes) +288\r\nSystem.Web.Mvc.Html.SelectExtensions.DropDownListFor(HtmlHelper1 htmlHelper, Expression1 expression, IEnumerable1 selectList, String optionLabel, IDictionary2 htmlAttributes) +130\r\nSystem.Web.Mvc.Html.SelectExtensions.DropDownListFor(HtmlHelper1 htmlHelper, Expression1 expression, IEnumerable`1 selectList) +80\r\nASP._Page_Modules_Orchard_Widgets_Views_EditorTemplates_Parts_Widgets_WidgetPart_cshtml.Execute() in src\\Orchard.Web\\Modules\\Orchard.Widgets\\Views\\EditorTemplates\\Parts.Widgets.WidgetPart.cshtml:10\r\nSystem.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253\r\nSystem.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148\r\nSystem.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122\r\nSystem.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName) +96\r\nOrchard.Core.Shapes.CoreShapes.RenderInternal(HtmlHelper Html, TextWriter Output, String TemplateName, Object Model, String Prefix) in src\\Orchard.Web\\Core\\Shapes\\CoreShapes.cs:766\r\nOrchard.Core.Shapes.CoreShapes.EditorTemplate(HtmlHelper Html, TextWriter Output, String TemplateName, Object Model, String Prefix) in src\\Orchard.Web\\Core\\Shapes\\CoreShapes.cs:754\r\n\r\n[TargetInvocationException: Exception has been thrown by the target of an invocation.]\r\nSystem.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0\r\nSystem.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128\r\nSystem.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146\r\nSystem.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +34\r\nOrchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAttributeStrategy\\ShapeAttributeBindingStrategy.cs:64\r\nOrchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.<>c__DisplayClass4.b__3(DisplayContext context) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAttributeStrategy\\ShapeAttributeBindingStrategy.cs:55\r\nOrchard.DisplayManagement.Descriptors.<>c__DisplayClass5.b__2(DisplayContext displayContext) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:56\r\nOrchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:203\r\nOrchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:99\r\nOrchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:86\r\nOrchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable`1 parameters) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:44\r\nOrchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:29\r\nCallSite.Target(Closure , CallSite , Object , Object ) +239\r\nOrchard.Core.Shapes.CoreShapes.ContentZone(Object Display, Object Shape, TextWriter Output) in src\\Orchard.Web\\Core\\Shapes\\CoreShapes.cs:286\r\n\r\n[TargetInvocationException: Exception has been thrown by the target of an invocation.]\r\nSystem.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0\r\nSystem.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +128\r\nSystem.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146\r\nSystem.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +34\r\nOrchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.ShapeAttributeBindingStrategy.PerformInvoke(DisplayContext displayContext, MethodInfo methodInfo, Object serviceInstance) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAttributeStrategy\\ShapeAttributeBindingStrategy.cs:64\r\nOrchard.DisplayManagement.Descriptors.ShapeAttributeStrategy.<>c__DisplayClass4.b__3(DisplayContext context) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAttributeStrategy\\ShapeAttributeBindingStrategy.cs:55\r\nOrchard.DisplayManagement.Descriptors.<>c__DisplayClass5.b__2(DisplayContext displayContext) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:56\r\nOrchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:203\r\nOrchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:99\r\nOrchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:86\r\nOrchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable1 parameters) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:44 Orchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:29 CallSite.Target(Closure , CallSite , Object , Object ) +239 ASP._Page_Modules_Orchard_Widgets_Views_Widget_Edit_cshtml.Execute() in src\\Orchard.Web\\Modules\\Orchard.Widgets\\Views\\Widget.Edit.cshtml:3 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122 System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +137 Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.ShapeTemplateBindingStrategy.Render(ShapeDescriptor shapeDescriptor, DisplayContext displayContext, HarvestShapeInfo harvestShapeInfo, HarvestShapeHit harvestShapeHit) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:151 Orchard.DisplayManagement.Descriptors.ShapeTemplateStrategy.<>c__DisplayClass28.<Discover>b__15(DisplayContext displayContext) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeTemplateStrategy\\ShapeTemplateBindingStrategy.cs:133 Orchard.DisplayManagement.Descriptors.<>c__DisplayClass5.<BoundAs>b__2(DisplayContext displayContext) in src\\Orchard\\DisplayManagement\\Descriptors\\ShapeAlterationBuilder.cs:56 Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Process(ShapeBinding shapeBinding, IShape shape, DisplayContext context) in src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:203 Orchard.DisplayManagement.Implementation.DefaultDisplayManager.Execute(DisplayContext context) in src\\Orchard\\DisplayManagement\\Implementation\\DefaultDisplayManager.cs:99 Orchard.DisplayManagement.Implementation.DisplayHelper.ShapeExecute(Object shape) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:86 Orchard.DisplayManagement.Implementation.DisplayHelper.Invoke(String name, INamedEnumerable1 parameters) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:44\r\nOrchard.DisplayManagement.Implementation.DisplayHelper.TryInvoke(InvokeBinder binder, Object[] args, Object& result) in src\\Orchard\\DisplayManagement\\Implementation\\DisplayHelper.cs:29\r\nCallSite.Target(Closure , CallSite , Object , Object ) +239\r\nSystem.Dynamic.UpdateDelegates.UpdateAndExecute2(CallSite site, T0 arg0, T1 arg1) +701\r\nASP._Page_Modules_Orchard_Localization_Views_admin_Translate_cshtml.Execute() in src\\Orchard.Web\\Modules\\Orchard.Localization\\Views\\Admin\\Translate.cshtml:7\r\nSystem.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253\r\nSystem.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148\r\nSystem.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122\r\nOrchard.Mvc.ViewEngines.ThemeAwareness.<>c__DisplayClass7.b__5(ViewContext viewContext, TextWriter writer, IViewDataContainer viewDataContainer) in src\\Orchard\\Mvc\\ViewEngines\\ThemeAwareness\\LayoutAwareViewEngine.cs:59\r\nOrchard.Mvc.ViewEngines.ThemeAwareness.LayoutView.Render(ViewContext viewContext, TextWriter writer) in src\\Orchard\\Mvc\\ViewEngines\\ThemeAwareness\\LayoutAwareViewEngine.cs:90\r\nSystem.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833\r\nSystem.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +81\r\nSystem.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +186\r\nSystem.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38\r\nSystem.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29\r\nSystem.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +65 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +36\r\nSystem.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38\r\nSystem.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +44\r\nSystem.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +65 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task`1 promise, Boolean requiresSynchronization) +77\r\nSystem.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +13844756\r\nSystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61\r\nSystem.Runtime.CompilerServices.TaskAwaiter.GetResult() +28\r\nOrchard.Mvc.Routes.<b__0>d__4.MoveNext() in src\\Orchard\\Mvc\\Routes\\ShellRoute.cs:174\r\nSystem.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +13844756\r\nSystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61\r\nSystem.Runtime.CompilerServices.TaskAwaiter.GetResult() +28\r\nOrchard.Owin.<b__0>d__2.MoveNext() in src\\Orchard\\Owin\\OrchardMiddleware.cs:17\r\nSystem.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +13844756\r\nSystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61\r\nSystem.Runtime.CompilerServices.TaskAwaiter.GetResult() +28\r\nOrchard.Mvc.Routes.d__7.MoveNext() in src\\Orchard\\Mvc\\Routes\\ShellRoute.cs:181\r\nSystem.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +13844756\r\nSystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +61\r\nSystem.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +69\r\nSystem.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +399\r\nSystem.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +157"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/120570343","html_url":"https://github.com/OrchardCMS/Orchard/issues/5501#issuecomment-120570343","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5501","id":120570343,"user":{"login":"Skrypt","id":3228637,"avatar_url":"https://avatars.githubusercontent.com/u/3228637?v=3","gravatar_id":"","url":"https://api.github.com/users/Skrypt","html_url":"https://github.com/Skrypt","followers_url":"https://api.github.com/users/Skrypt/followers","following_url":"https://api.github.com/users/Skrypt/following{/other_user}","gists_url":"https://api.github.com/users/Skrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/Skrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skrypt/subscriptions","organizations_url":"https://api.github.com/users/Skrypt/orgs","repos_url":"https://api.github.com/users/Skrypt/repos","events_url":"https://api.github.com/users/Skrypt/events{/privacy}","received_events_url":"https://api.github.com/users/Skrypt/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T04:01:34Z","updated_at":"2015-07-11T04:01:34Z","body":"Duplicate of #5031\r\nWill need to find time to fix this one. This is getting reported often."}}