Umbraco Macro raise Null Reference error
I've created a "PageNotFound" template. When it is invoked by its URL everything is fine. But when it is shown when user entered an invalid URL, inner macros is not loaded and in the source code of the page I received this error:
Error generating macroContent: 'System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.library.RenderT开发者_如何学编程emplate(Int32 PageId, Int32 TemplateId)'
Please help me!
It seems that this could be due to a bug in the RenderTemplate method. Do you absolutely have to use RenderTemplate, or is there another way that you could solve what you're trying to do.
If you could describe what the RenderTemplate bit is supposed to do, an alternative can be recommended.
精彩评论