I'm getting a lot of these messages in my logs when navigating to the developer section in the back office. I've disabled the package and the issue goes away so pretty confident it is here but I may not have configured it correctly. Is this a known issue - do other people see this?
Could not retrieve current xml node
System.NullReferenceException: Object reference not set to an instance of an object.
at umbraco.library.GetXmlNodeCurrent()
I haven't had any one mention this before, but I just had a quick look at the Umbraco sourcecode and I can see why you would get these log messages.
The package is using a standard XSLT macro, but because it's rendering it in a dashboard, there's no current node to pass into the $currentPage parameter, so I guess the macro service logs a message about that.
Sadly, I don't know of any way to avoid this (besides wrapping some custom code around the macro rendering - but I can't do that).
Are you getting any kind of performance hits, or were you just worried about the number of messages?
That makes perfect sense. I'm not getting a performance hit (I'm only in dev at the moment anyway) but it does throw a full exception which could cause some issue later on.
As it only happens when the developer tab is navigated to it isn't the biggest issue in the world. I guess this would need either changing from a macro or the umbraco core team to add this check if in the back office and using the macro service?
As it only happens when the developer tab is navigated to it isn't the
biggest issue in the world. I guess this would need either changing from a
macro or the umbraco core team to add this check if in the back office and
using the macro service?
Since it's only a problem with XSLT macros (I guess?), I don't think there's much incentive to fix it (e.g., by providing an overload that doesn't try to set $currentPage)
A lot of errors in log
Hi,
I'm getting a lot of these messages in my logs when navigating to the developer section in the back office. I've disabled the package and the issue goes away so pretty confident it is here but I may not have configured it correctly. Is this a known issue - do other people see this?
Hi David,
I haven't had any one mention this before, but I just had a quick look at the Umbraco sourcecode and I can see why you would get these log messages.
The package is using a standard XSLT macro, but because it's rendering it in a dashboard, there's no current node to pass into the
$currentPage
parameter, so I guess the macro service logs a message about that.Sadly, I don't know of any way to avoid this (besides wrapping some custom code around the macro rendering - but I can't do that).
Are you getting any kind of performance hits, or were you just worried about the number of messages?
/Chriztian
Hi Chriztian,
That makes perfect sense. I'm not getting a performance hit (I'm only in dev at the moment anyway) but it does throw a full exception which could cause some issue later on.
As it only happens when the developer tab is navigated to it isn't the biggest issue in the world. I guess this would need either changing from a macro or the umbraco core team to add this check if in the back office and using the macro service?
Thanks, David
Yes, it's happening here in the library.cs file (AFAIK). Not sure about how to handle this best, though...
Since it's only a problem with XSLT macros (I guess?), I don't think there's much incentive to fix it (e.g., by providing an overload that doesn't try to set
$currentPage
)is working on a reply...