Copied to clipboard

Flag this post as spam?

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


  • DrewJigsaw 12 posts 29 karma points
    Feb 02, 2011 @ 15:53
    DrewJigsaw
    0

    Error in 'getContentsWithTags'

    Wondering if anyone else has seen this. We have a multi site instilation running 4.6.1 on .NET 4 using the legacy schema. We use the tags control on our central article repository to form loose relationships between content. This is across a 100 or so nodes. But in the last few weeks since our upgrade to 4.6.1 any XSLT routine that utilises getContentsWithTags returns Error parsing XSLT file.

    With a little debug I can get at the full error but alas I can't work out what is causing the issue.

    Any body out there have a clue what I've broken?

    An error occurred during a call to extension 
    function 'getContentsWithTags'. See InnerException for a complete 
    description of the error.
    An error occurred during a call to extension function 'getContentsWithTags'. See InnerException for a complete description of the error.
      at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args)
      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:\Inetpub\wwwroot\j24portals_461\xslt\EducationSearch.xslt:line 436
      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)
  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Feb 02, 2011 @ 19:58
    Jan Skovgaard
    0

    Hi Drew

    Could you also post the XSLT that's causing this error? I think it will be more easy to advise you if you post this too :-)

    /Jan

  • DrewJigsaw 12 posts 29 karma points
    Feb 03, 2011 @ 10:46
    DrewJigsaw
    0

    Hi Jan,

    Thanks for your reply, the routines this call features in are fairly large but I can drop over the template which calls this function.
    As I said in my post all these functions had been working fine up until the week we upgraded to 4.6.2 although it could also be data entry that's 'killed' it.

    <xsl:template name="relatedArticle">
    <xsl:param name="theNode" />

    <xsl:variable name="sort">
    <articles>
    <xsl:for-each select="Exslt.ExsltStrings:split($theNode/data [@alias = 'Tags'],',')">
    <xsl:variable name="theTag" select="current()" />
    <xsl:for-each select="tagsLib:getContentsWithTags($theTag)/root/node">
    <xsl:if test="./@id != $theNode/@id">
    <articles>
    <id>
    <xsl:value-of select="./@id"></xsl:value-of>
    </id>
    </articles>
    </xsl:if>
    </xsl:for-each>
    </xsl:for-each>
    </articles>
    </xsl:variable>
    <xsl:if test="count(msxml:node-set($sort)/articles/articles) &gt; 0">

    <div class="list-panel append-bottom">
    <h3>Related Pages</h3>
    <xsl:element name="ul">
    <xsl:for-each select="msxml:node-set($sort)/articles/articles [umbraco.library:GetXmlNodeById(id) /ancestor::node [@level=1] /@id = '1090']">
    <xsl:if test="not(./id = preceding-sibling::articles/id)">
    <xsl:if test="position() &lt; 4">
    <xsl:variable name="node" select="umbraco.library:GetXmlNodeById(id)"/>
    <xsl:variable name="parentUrl">
    <xsl:choose>
    <xsl:when test="$node/@nodeTypeAlias = 'News Article'">
    <xsl:value-of select="'news'"/>
    </xsl:when>
    <xsl:when test="$node/@nodeTypeAlias = 'Event'">
    <xsl:value-of select="'events'"/>
    </xsl:when>
    <xsl:when test="$node/@nodeTypeAlias = 'CaseStudy'">
    <xsl:value-of select="'case-studies'"/>
    </xsl:when>
    <xsl:when test="$node/@nodeTypeAlias = 'Review'">
    <xsl:value-of select="'reviews'"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="'articles'"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:variable>

    <xsl:variable name="readMoreLink">
    <xsl:choose>
    <xsl:when test="$currentPage/@nodeName = 'Case Studies'">
    <xsl:value-of select="'Read the case study'"/>
    </xsl:when>
    <xsl:when test="$currentPage/@nodeName = 'Events'">
    <xsl:value-of select="'Read the event details'"/>
    </xsl:when>
    <xsl:when test="$currentPage/@nodeName = 'News'">
    <xsl:value-of select="'Read the full news article'"/>
    </xsl:when>
    <xsl:when test="$currentPage/@nodeName = 'Articles'">
    <xsl:value-of select="'Read the full article'"/>
    </xsl:when>
    <xsl:when test="$currentPage/@nodeName = 'Reviews'">
    <xsl:value-of select="'Read the review'"/>
    </xsl:when>
    </xsl:choose>
    </xsl:variable>

    <xsl:element name="li">
    <div class="text">
    <h4>
    <xsl:attribute name="class">title</xsl:attribute>
    <xsl:element name="a">
    <xsl:attribute name="href">
    /<xsl:value-of select="$parentUrl"/>/<xsl:value-of select="$node/@urlName"/>
    </xsl:attribute>
    <xsl:value-of select="$node/@nodeName" />
    </xsl:element>
    </h4>
    <p class="author">
    <xsl:value-of select="umbraco.library:FormatDateTime($node/data [@alias = 'articleDate'],'dd MMM yyyy')" />
    </p>
    <p class="intro">
    <xsl:value-of select="$node/data [@alias = 'newsPreText']" />
    </p>
    <xsl:element name="a">
    <xsl:attribute name="href">
    /<xsl:value-of select="$parentUrl"/>/<xsl:value-of select="$node/@urlName"/>
    </xsl:attribute>
    <xsl:attribute name="class">readmore</xsl:attribute>
    <xsl:value-of select="$readMoreLink"/>
    </xsl:element>
    </div>
    </xsl:element>
    </xsl:if>
    </xsl:if>
    </xsl:for-each>
    </xsl:element>
    </div>
    </xsl:if>
    </xsl:template>
  • DrewJigsaw 12 posts 29 karma points
    Feb 09, 2011 @ 11:20
    DrewJigsaw
    0

    Hi everyone,

    Anyone have any ideas what could cause "GetContentsWithTags" to fail site wide. As I said in my original post this function fails regardless of where I call it or how. Even if I write an XSLT that consists of nothing but

    <xsl:for-each select="tagsLib:getContentsWithTags('Apple')"/>
    <xsl:value-of select="@id"/>
    </xsl:for-each>

    I will still recieve the above error. Like I said any ideas would be appreciated =)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies