RenderTemplate(pageId) fails after upgrading to 4.11 - from 4.7
Hi
In the mail module from Nibble I call umbraco.library.RenderTemplate(pageId) in a dialog and it has worked fine until I upgraded to 4.11 - now it fails with a nullreference exception. I downloaded the source and found the problem
In the TemplateRenderer.cs - in the Render method I found it necessary to test for null like this
//set the culture to the same as is currently rendering if (_umbracoContext.PublishedContentRequest != null) contentRequest.Culture = _umbracoContext.PublishedContentRequest.Culture;
The problem occurs because this test is not done in the current version
Does anyone knows why this has become necessary and perhaps how I can avoid having to do the change
Perhaps it has something to do with the new MVC render engine in 4.11. You can check the file's history in mercurial. Perhaps in the comments you can see why it's done. Might be good to report this on http://issues.umbraco.org
RenderTemplate(pageId) fails after upgrading to 4.11 - from 4.7
Hi
In the mail module from Nibble I call umbraco.library.RenderTemplate(pageId) in a dialog and it has worked fine until I upgraded to 4.11 - now it fails with a nullreference exception. I downloaded the source and found the problem
In the TemplateRenderer.cs - in the Render method I found it necessary to test for null like this
The problem occurs because this test is not done in the current version
Does anyone knows why this has become necessary and perhaps how I can avoid having to do the change
thanks
PaulS
Perhaps it has something to do with the new MVC render engine in 4.11. You can check the file's history in mercurial. Perhaps in the comments you can see why it's done. Might be good to report this on http://issues.umbraco.org
Jeroen
Hi
It appears to have been rewritten. I have created an issue
thanks
Paul S
is working on a reply...