Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Lars Mortensen 90 posts 98 karma points
    Sep 12, 2010 @ 12:18
    Lars Mortensen
    0

    After upgrade to 4.5.2 I get "Error prasing XSLT"

    Hi

    I have just upgraded a site from 4.0.3 to 4.5.2

    Most of my XSLT files is now failing.

    When trying to save the XSLT again I get error:

    Error occured

    System.OverflowException: Value was either too large or too small for an Int32.
    at System.Convert.ToInt32(Double value)
    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 (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 parent)
    at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
    at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
    at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
    at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

    Can anyone help with this?

  • Jonas Eriksson 930 posts 1825 karma points
    Sep 12, 2010 @ 12:50
    Jonas Eriksson
    0

    Hi, the default Xslt schema changed, be sure to set the UseLegacyXmlSchema to True

    Ref http://our.umbraco.org/wiki/about/roadmap/umbraco-45/upgrading-to-umbraco-45

    UseLegacyXmlSchema element in umbracoSettings.config. Umbraco 4.5 features a new more fluent XML schema, but if you got a ton of old XSLT you'll need to manually update these to fit with the new schema. Instead of doing that you can simply set the UseLegacyXmlSchema element to true and your XSLTs will work as Umbraco 4.5 will use the same XML schema as the previous Umbraco versions

  • Jonas Eriksson 930 posts 1825 karma points
    Sep 12, 2010 @ 13:53
    Jonas Eriksson
    0

    Also be sure to check your variables before using them in NiceUrl or other functions that require valid integers. See http://our.umbraco.org/forum/developers/xslt/3102-Using-niceurl--Value-was-either-too-large-or-too-small-for-an-Int32-

  • Lars Mortensen 90 posts 98 karma points
    Sep 12, 2010 @ 14:04
    Lars Mortensen
    0

    Hi

    I changed the UseLegacyXmlSchema suggested and it solved my problem, thank you.

    Allways nice with fast premium answers in this forum.

    /nOrphf

Please Sign in or register to post replies

Write your reply to:

Draft