Render Partial from custom UmbracoAuthorizedController fails after upgrade to 7.4.0
I have an existing backoffice controller inheriting from UmbracoAuthorizedController that is used to preview a grid editor's output within the grid, by rendering a partial view with a model of type UmbracoViewPage<dynamic>
[IsBackOffice]
public class GridController : UmbracoAuthorizedController
{
[HttpPost, ValidateInput(false)]
public ActionResult Preview(string viewPath)
{
Request.InputStream.Seek(0, SeekOrigin.Begin);
var json = new StreamReader(Request.InputStream).ReadToEnd();
dynamic model = JsonConvert.DeserializeObject(json);
return PartialView(viewPath, model);
}
}
This has been working quite well, until the update to 7.4.0. The error I'm getting is:
[NullReferenceException: Object reference not set to an instance of an object.]
Umbraco.Web.Mvc.UmbracoViewPage`1.SetViewData(ViewDataDictionary viewData)
Any ideas as to how I can fix this? Is there a way to change the internal state of the UmbracoContext so that my code no longer fails?
Render Partial from custom UmbracoAuthorizedController fails after upgrade to 7.4.0
I have an existing backoffice controller inheriting from
UmbracoAuthorizedController
that is used to preview a grid editor's output within the grid, by rendering a partial view with a model of typeUmbracoViewPage<dynamic>
This has been working quite well, until the update to 7.4.0. The error I'm getting is:
Any ideas as to how I can fix this? Is there a way to change the internal state of the UmbracoContext so that my code no longer fails?
This is fixed in 7.4.1: https://our.umbraco.org/contribute/releases/741/
is working on a reply...