I have a macro that accepts two parameters which represent the nodeID of my content nodes.
I am prompted to enter values for these parameters when I add the macro to my template.
I know these nodes exist (they are non-zero values) but when I try to view my page I get the error:
No node exists with id '0'
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.ArgumentException: No node
exists with id '0'
are you talking about a XSLT or a .Net macro? Can you please post a bit of your code, especially when you read the parsed in value and what exactly you are doing when the exception gets thrown?
Sometimes I run into a bit trouble with macro parameters as well, don't know if it's a caching issue or if some alias names are reserved (e.g. 'text'). What I usually do is add another parameter with an alias like 'myParameter1' which is just of type text and see if it gets through by doing just this:
Macro parameter value not being passed
Hi,
I have a macro that accepts two parameters which represent the nodeID of my content nodes.
I am prompted to enter values for these parameters when I add the macro to my template.
I know these nodes exist (they are non-zero values) but when I try to view my page I get the error:
No node exists with id '0'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentException: No node exists with id '0'
What could be wrong?
Hi JL,
are you talking about a XSLT or a .Net macro? Can you please post a bit of your code, especially when you read the parsed in value and what exactly you are doing when the exception gets thrown?
Sometimes I run into a bit trouble with macro parameters as well, don't know if it's a caching issue or if some alias names are reserved (e.g. 'text'). What I usually do is add another parameter with an alias like 'myParameter1' which is just of type text and see if it gets through by doing just this:
<xsl:param name="myParameter1" source="/macro/myParameter1" />
<xsl:template match="/">
<xsl:value-of select="$myParameter1" />
</xsl:template>
Cheers,
Sascha
is working on a reply...