Copied to clipboard

Flag this post as spam?

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


  • Anthony Barsotti 26 posts 66 karma points
    Oct 08, 2014 @ 22:19
    Anthony Barsotti
    0

    Error In uTwit GetLatestTweets Function

    I'm currently experiencing an issue that just suddenly appeared on a client's site in regards to the uTwit Latest Tweets XSLT file. The code is as follows:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE xsl:stylesheet [

      <!ENTITY nbsp "&#x00A0;">

    ]>

    <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:uTwit="urn:uTwit"

      exclude-result-prefixes="msxml umbraco.library uTwit">

      <xsl:import href="TweetList.xslt"/>

      <xsl:output method="html" omit-xml-declaration="yes" />

      <xsl:param name="currentPage"/>

      <xsl:param name="twitterOAuthPropertyAlias" select="'twitter'" />

      <xsl:param name="numberOfTweetsToDisplay" select="1" />

      <xsl:param name="includeReplies" select="true()" />

      <xsl:param name="includeRetweets" select="true()" />

      <xsl:template match="/">

     <xsl:variable name="config" select="$currentPage/*[local-name() = $twitterOAuthPropertyAlias]/uTwit" />

        <xsl:variable name="tweets" select="uTwit:GetLatestTweets($config/OAuthToken, $config/OAuthTokenSecret, $config/ConsumerKey, $config/ConsumerSecret, $config/ScreenName, $numberOfTweetsToDisplay, $includeReplies, $includeRetweets)" />

     <xsl:if test="count($tweets) &gt; 0">

    <xsl:call-template name="RenderTweets">

            <xsl:with-param name="tweets" select="$tweets" />

          </xsl:call-template>

        </xsl:if>

      </xsl:template>

    </xsl:stylesheet>

    I don't think there is a problem with the code though as it worked in the past and just suddenly stopped working. The error is quite extensive so I'm not including the entire thing but the relevant line is as follows:

    The data contract type 'Our.Umbraco.uTwit.Models.Status' cannot be serialized in partial trust because the property 'LinkifiedTextRaw' does not have a public getter.

    You can view the entire stacktrace though at csobgyn.com/?umbdebugshowtrace="true"

    Also it's throwing the error on line 51 which is where the tweets variable is declared.

Please Sign in or register to post replies

Write your reply to:

Draft