I've downloaded the package uComments and it works fine when I drop the macro 'UCommentListComments' in my template.
But when I need to render it through RenderMacroContent in my XSLT file it fails like this: <!-- Error generating macroContent: 'System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.page..ctor(XmlNode xmlNode) at umbraco.library.RenderMacroContent(String Text, Int32 PageId)' -->
That @id you're sending to the function should be the id of the page you want to act as currentPage when the macro gets rendered, so make sure you're calling the function at a point where $currentPage is the context node. Safest solution would be to explicitly take it from $currentPage, e.g.:
uComments through RenderMacroContent = fail
Hi Folks
I've downloaded the package uComments and it works fine when I drop the macro 'UCommentListComments' in my template.
But when I need to render it through RenderMacroContent in my XSLT file it fails like this:
<!-- Error generating macroContent: 'System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.page..ctor(XmlNode xmlNode) at umbraco.library.RenderMacroContent(String Text, Int32 PageId)' -->
This is how I render it:
Hi Sebastian,
That @id you're sending to the function should be the id of the page you want to act as currentPage when the macro gets rendered, so make sure you're calling the function at a point where $currentPage is the context node. Safest solution would be to explicitly take it from $currentPage, e.g.:
/Chriztian
is working on a reply...