{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6501","repository_url":"https://api.github.com/repos/OrchardCMS/Orchard","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6501/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6501/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6501/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/6501","id":137103464,"number":6501,"title":"Edit folder in 1.10 branch fails with exception","user":{"login":"attilah","id":230432,"avatar_url":"https://avatars.githubusercontent.com/u/230432?v=3","gravatar_id":"","url":"https://api.github.com/users/attilah","html_url":"https://github.com/attilah","followers_url":"https://api.github.com/users/attilah/followers","following_url":"https://api.github.com/users/attilah/following{/other_user}","gists_url":"https://api.github.com/users/attilah/gists{/gist_id}","starred_url":"https://api.github.com/users/attilah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/attilah/subscriptions","organizations_url":"https://api.github.com/users/attilah/orgs","repos_url":"https://api.github.com/users/attilah/repos","events_url":"https://api.github.com/users/attilah/events{/privacy}","received_events_url":"https://api.github.com/users/attilah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-28T22:18:01Z","updated_at":"2016-02-29T15:20:49Z","closed_at":null,"body":"Repro:\r\n1. create folder\r\n2. select folder\r\n3. edit folder\r\n\r\nI think that a missing NOT is the cause of the error in GetRootMediaFolder method:\r\n\r\n```\r\n            if (_orchardServices.Authorizer.Authorize(Permissions.ManageMediaContent)) {\r\n                return null;\r\n            }\r\n```\r\n\r\nThat code reads that if authorized return null.\r\n\r\nException:\r\nAn unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back\r\nObject reference not set to an instance of an object.\r\nSystem.NullReferenceException: Object reference not set to an instance of an object. at Orchard.MediaLibrary.Controllers.FolderController.IsRootFolder(String folderPath) at Orchard.MediaLibrary.Controllers.FolderController.Edit(String folderPath) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.ActionInvocation.InvokeSynchronousActionMethod() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/190254774","html_url":"https://github.com/OrchardCMS/Orchard/issues/6501#issuecomment-190254774","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6501","id":190254774,"user":{"login":"BenedekFarkas","id":2797449,"avatar_url":"https://avatars.githubusercontent.com/u/2797449?v=3","gravatar_id":"","url":"https://api.github.com/users/BenedekFarkas","html_url":"https://github.com/BenedekFarkas","followers_url":"https://api.github.com/users/BenedekFarkas/followers","following_url":"https://api.github.com/users/BenedekFarkas/following{/other_user}","gists_url":"https://api.github.com/users/BenedekFarkas/gists{/gist_id}","starred_url":"https://api.github.com/users/BenedekFarkas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenedekFarkas/subscriptions","organizations_url":"https://api.github.com/users/BenedekFarkas/orgs","repos_url":"https://api.github.com/users/BenedekFarkas/repos","events_url":"https://api.github.com/users/BenedekFarkas/events{/privacy}","received_events_url":"https://api.github.com/users/BenedekFarkas/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T15:20:49Z","updated_at":"2016-02-29T15:20:49Z","body":"Hey - I've fixed that a few days ago on the 1.9.3 branch (it will be merged into 1.10) in this commit: https://github.com/OrchardCMS/Orchard/commit/b983787d0d9370ec8c1158ee1f66c4214b7f245b"}}