No, the problem is not related to that variable (it's not used anywhere either).
The problem is that you're most likely having some subpages of the $source page, which don't have a value in the targetPage property - and when you call NiceUrl() with a null value, you will get an error.
You will also get an error if you don't have a value for the source parameter for the macro.
To safeguard, make sure there's a value in the properties before calling GetXmlNodeById() or NiceUrl() - like this:
Could you try adding ?umbDebugShowTrace=True to the URL where this happens?
If you have debug switched on (web.config - look for <add key="umbracoDebugMode" value="true" />) you should get a better error description where your macro fails.
Açklama: Bu istee hizmet vermek için gereken bir yaplandrma dosyas ilenirken bir hata olutu. Lütfen aadaki özel hata ayrntlarn gözden geçirin ve yaplandrma dosyanz uygun biçimde deitirin.
Value was either too large or too small for an Int32. Value was either too large or too small for an Int32. at System.Convert.ToInt32(Double value) at System.Double.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in C:\Users\ndogan\Documents\My Web Sites\Umbraco CMS\xslt\AdvancitySpotLister.xslt:line 29 at System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double ) at System.Xml.Xsl.CompiledQuery.Query.Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError)
Error parsing XSLT file: \xslt\AdvancitySpotLister.xslt
I am trying to use a photo slider but i am getting Error parsing XSLT file: \xslt\AdvancitySpotLister.xslt problem.
My XSLT file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:param name="currentPage"/>
<!-- Don't change this, but add a 'contentPicker' element to -->
<!-- your macro with an alias named 'source' -->
<xsl:variable name="source" select="/macro/source"/>
<xsl:variable name="elma" select="0"/>
<xsl:template match="/">
<div style='width:702px'>
<div id='coin-slider' class='coin-slider'>
<xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc]">
<!-- BU SATIRA GEREK YOK
<xsl:value-of select="{umbraco.library:NiceUrl(targetPage)}"/>
-->
<a href="{umbraco.library:NiceUrl(targetPage)}">
<img>
<xsl:attribute name="src">
<xsl:value-of select="imageFile"/>
</xsl:attribute>
</img>
<span>
<xsl:value-of select="@nodeName"/>
</span>
</a>
</xsl:for-each>
</div></div>
<script type="text/javascript">
$(document).ready(function () {
$('#coin-slider').coinslider({delay: 6000,effect: '',height: 269,hoverPause: true,links: true,navigation: true,opacity: 0.7,sDelay: 30,sph: 5,spw: 7,titleSpeed: 500,width: 702 });
});
</script>
</xsl:template>
</xsl:stylesheet>
..................................................
is there anything about <xsl:variable name="elma" select="0"/>
Hi dris,
No, the problem is not related to that variable (it's not used anywhere either).
The problem is that you're most likely having some subpages of the $source page, which don't have a value in the targetPage property - and when you call NiceUrl() with a null value, you will get an error.
You will also get an error if you don't have a value for the source parameter for the macro.
To safeguard, make sure there's a value in the properties before calling GetXmlNodeById() or NiceUrl() - like this:
/Chriztian
I have the source parameter for the macro.
value in the properties? I do not know what that mean.
I checked my xsltExtensions.config file , is epmty. I do have all parameters but still same problem.
Any idea?
Could you try adding ?umbDebugShowTrace=True to the URL where this happens?
If you have debug switched on (web.config - look for <add key="umbracoDebugMode" value="true" />) you should get a better error description where your macro fails.
/Chriztian
I am using this for slider-show on Home page. I add the code to the URL but nothing happens.
When I debug Web.config file I get this error.
Sorry, here is the error.
'/Umbraco CMS' Uygulamasnda Sunucu Hatas.
Yaplandrma Hatas
Açklama: Bu istee hizmet vermek için gereken bir yaplandrma dosyas ilenirken bir hata olutu. Lütfen aadaki özel hata ayrntlarn gözden geçirin ve yaplandrma dosyanz uygun biçimde deitirin.
Ayrtrc Hatas letisi: Tannmayan yaplandrma bölümü: system.web.extensions.
Kaynak Hatas:
Satr 163: </system.web> Satr 164: <!-- ASPNETAJAX --> Satr 165: <system.web.extensions> Satr 166: <scripting> Satr 167: <scriptResourceHandler enableCompression="true" enableCaching="true"/>
Kaynak Dosya: C:\Users\ndogan\Documents\My Web Sites\Umbraco CMS\web.config Satr: 165
Sürüm Bilgisi: Microsoft .NET Framework Sürümü:2.0.50727.5466; ASP.NET Sürümü:2.0.50727.5456
This is what I got
Value was either too large or too small for an Int32.
Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="/">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in C:\Users\ndogan\Documents\My Web Sites\Umbraco CMS\xslt\AdvancitySpotLister.xslt:line 29
at System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )
at System.Xml.Xsl.CompiledQuery.Query.Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.macro.LoadMacroXslt(macro macro, MacroModel model, Hashtable pageElements, Boolean throwError)
I fixed my error by using $source instead of targetpage.
is working on a reply...