Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Sunday, 16 February 2014

Umbraco 7 - Cannot Delete Nodes/Content Etc

Umbraco 7 Error occures when you have WebDAV module enabled, never really used it myself, so that's where my knowledge ends :D

Umbraco tries to call using DELETE method, if you check your net tab(using firebug) then you will see the error:


http://umbraco.local/umbraco/UmbracoApi/Content/DeleteById?id=1066

In the response text, you will notice:

IIS 8.0 Detailed Error - 405.0 - Method Not Allowed

The Fix:





Once yous save the web.config, the app pool should recycle anyway and then it should work.

Wednesday, 17 July 2013

Umbraco - uTwit - Fun and Games - Errors, Bad Request Etc

After messing around with uTwit and reading a lot of other posts, I finally managed to get it going. The following script actually works, others have posted similar scripts, but they always seem to be missing something. You have to setup a twitter account and goto dev.twitter, setup an application, setup a callback url(can be anything, but needs to be there), generate auth details. Few things to check, make sure you have installed the Uwit package datatype etc. Add the property for example to your homepage which is what I have done in this case called 'twitter'. You install using the .zip files, I didn't realise this at first, lol :D The home node is the id that you will need to reference, I have tried to cover all bases here as I appreciate everyone has different uses and implementations. Hopefully this will all make sense. There are commented out lines should you need to hardcode or called a specific node id. You will need to add the following references to you project: Our.Umbraco.uTwit.DataType.dll Our.Umbraco.uTwit.Web.dll @inherits umbraco.MacroEngines.DynamicNodeContext @using Our.Umbraco.uTwit @using umbraco.NodeFactory @{ const string twitterOAuthPropertyAlias = "twitter"; const int numberOfTweetsToDisplay = 3; const bool includeReplies = false; const bool includeRetweets = true; // Get current node Node home = umbraco.NodeFactory.Node.GetCurrent(); // Alternatively if you have a settings node for example use a specific id //var home = Model.NodeById(1079); // If you want to hard code the details then use this line // string twitterOAuth = "{'ScreenName': 'xxx','OAuthToken': 'xxx','OAuthTokenSecret': 'xxx','ConsumerKey': 'xxx','ConsumerSecret': 'xxx'}"; string twitterOAuth = home.GetProperty(twitterOAuthPropertyAlias); // If you use a specific node ID then use this instead //string twitterOAuth = home.GetPropertyValue(twitterOAuthPropertyAlias) as string(); var config = uTwit.DeserializeValue(twitterOAuth); var tweets = uTwit.GetLatestTweets(config, numberOfTweetsToDisplay, includeReplies, includeRetweets); if (tweets != null) { foreach (var tweet in tweets) { var tweetToDisplay = tweet.IsRetweet ? tweet.RetweetedStatus : tweet;
@tweetToDisplay.User.Name @tweetToDisplay.User.Name @uTwit.FormatDate(tweetToDisplay.CreatedAt)

@tweetToDisplay.LinkifiedText

@if(tweet.IsRetweet) {

Retweeted by @tweet.User.ScreenName

}
} } } Hope this saved some of you some headaches when it wasn't working.

Friday, 12 July 2013

Could not find file DotNetOpenAuth.Core.dll

Error 1 Copying file bin\DotNetOpenAuth.Core.dll to obj\Release\Package\PackageTmp\bin\DotNetOpenAuth.Core.dll failed. Could not find file 'bin\DotNetOpenAuth.Core.dll'. 0 0 UKDJAgencyUmbraco You can fix this by downloading the package using nuget, or if you have already done that, have a look in the packages folder in your solution, this should have all the dlls you require, just make sure you use the correct dll for the relevant .net version you are working on.