I've followed the installation instructions, authorized my app etc and then I've added the Macro to the page, using the LatestTweets.xslt file, however, constantly receive the error;
Could you try adding ?umbdebugshowtrace=1 to the url? This should show a stack trace and hopefully a more detailed error description will be shown, which can lead to the solution.
The most likely culprit will be that your datatype is told to store it's value as JSON rather than XML. Try modifying the prevalue of the uTwit data type and set its data format to XML then republish your content node (this will re-save its value in the correct format) then try your xslt again.
No worries. It's not the most obvious error. Unfortunately there is not way to know which version you actually want to use so I have to go with the most common, which moving forward will probably be razor, hence why it's JSON by default.
2013-11-14 10:08:05,945 [34] WARN umbraco.macro - Exception during StringFormat: Die Eingabezeichenfolge hat das falsche Format. [Thread 5] Error parsing XSLT file. Exception: System.Xml.Xsl.XslTransformException: An error occurred during a call to extension function 'GetLatestTweets'. See InnerException for a complete description of the error. ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at DevDefined.OAuth.Consumer.ConsumerRequest.ToWebResponse()
at DevDefined.OAuth.Consumer.ConsumerRequest.ToString()
at Our.Umbraco.uTwit.uTwit.GetLatestTweets(String oauthToken, String oauthTokenSecret, String consumerKey, String consumerSecret, String screenName, Int32 count, Boolean includeReplies, Boolean includeRetweets)
at Our.Umbraco.uTwit.uTwitXslt.GetLatestTweets(String oauthToken, String oauthTokenSecret, String consumerKey, String consumerSecret, String screenName, Int32 count, Boolean includeReplies, Boolean includeRetweets)
--- End of inner exception stack trace ---
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 (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at 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){}
You are getting an unauthorised response from Twitter so I'd check that you have successfully authorized an account with the uTwit data type first and that you are passing it the right credentials.
It looks like you are using the default uTwit twitter app. It might be a good idea to create your own app at dev.twitter.com and enter the relevant credentials in the uTwit datatypes prevalue. Be sure to follow the guidlines for creating an app carefully, especially around setting a callback url (doesn't need to exist, just needs to be set). Give that a go and see if it helps. I don't tend to recommend people use the uTwit twitter app.
Error parsing XSLT file: \xslt\LatestTweets.xslt
I've followed the installation instructions, authorized my app etc and then I've added the Macro to the page, using the LatestTweets.xslt file, however, constantly receive the error;
Can somebody help me with this problem please?
Hi Christopher and welcome to our :)
Could you try adding ?umbdebugshowtrace=1 to the url? This should show a stack trace and hopefully a more detailed error description will be shown, which can lead to the solution.
Please post the text marked in red in here.
Cheers,
Jan
Hi Christopher,
The most likely culprit will be that your datatype is told to store it's value as JSON rather than XML. Try modifying the prevalue of the uTwit data type and set its data format to XML then republish your content node (this will re-save its value in the correct format) then try your xslt again.
Cheers
Matt
Ha, stupid error.
Thanks for the replies - I hadn't switched to XML in the Data Type!
Hey Chris,
No worries. It's not the most obvious error. Unfortunately there is not way to know which version you actually want to use so I have to go with the most common, which moving forward will probably be razor, hence why it's JSON by default.
Glad you got it working though.
Matt
@Matt and Jan:
Hi,
I'm just gone through your installation instructions. UmbracoTraceLog says the following:
Hi @Andreas,
You are getting an unauthorised response from Twitter so I'd check that you have successfully authorized an account with the uTwit data type first and that you are passing it the right credentials.
Matt
Hi Matt.
Thank you for your quick response. I am authorized as normal. Unfortunately, I still get always the error. Here are a few screens
The last screen is the log which I have previously written
Hi @Andreas,
It looks like you are using the default uTwit twitter app. It might be a good idea to create your own app at dev.twitter.com and enter the relevant credentials in the uTwit datatypes prevalue. Be sure to follow the guidlines for creating an app carefully, especially around setting a callback url (doesn't need to exist, just needs to be set). Give that a go and see if it helps. I don't tend to recommend people use the uTwit twitter app.
Matt
is working on a reply...