Monday 18 April 2011

Umbraco - Missing node in content tree.


I've encountered this problem a few times, a page will go missing from the Umbraco content tree but it will still display on the front end.

It doesn’t show up in the recycle bin but you can find it when you search for it by name, and when you try and open it you get the following server error:

“No Document exists with Version 'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx”

It turns out to be due to data being orphaned when the database is updating, you can find out more here .

I followed the advice on the Umbraco issue tracker and deleted the last entry for the affected node in the cmsContentVersion table, it worked for me.

Sunday 17 April 2011

jsFiddle

I just discovered a site for rapid Javascript development and testing called jsFiddle.

It allows you to write html, css and Javascript code in browser, you can also share your examples with others.

I know its not new, but I thought I would post this so I don't forget about it, looks like it could be a real time saver.


Thursday 14 April 2011

Websockets


Something I always like about flash was the ability to push data from the server to the client for real-time communication.

For me the down side was it always required some server side technology like Red5 or BlazeDS, and I never had the time to get into Java to do anything too complicated.

Now there is a much better replacement with HTML5 and Websockets, you can push data from the server with a bit of C# and capture it with some simple Javascript.

Websockets aren’t supported by all browsers yet, but I think its quite a handy development, and there are quite a few c# libraries out there to get started.

I had a look at some of them:


They all seem pretty good and fairly easy to use but I had to start with one, Superwebsocket seemed to be the option for me.

One of my main problems with this kind of thing in Flash was it required a separate, standalone server running along side your website.  Superwebsocket’s gives you a few options, you can create a standalone server or you can integrate the code into an existing web project.

Its pretty easy to get started, once you include their DLL’s in your project, most of the code for dealing with client/server commands is included in the global.asax with a little configuration information in the web.config.
I created a fairly simple example here, most other demo’s are basic chatrooms, I thought I’d test to see if it would be feasible to use Websockets for a multiplayer game.

It’s a little jerky, I don’t know if it’s my coding or because I’m integrating the server code into the website, I’m going to try a standalone server version as well to see if it makes a difference.

Tuesday 12 April 2011

Umbraco login problem - Missing style


I recently ran into a problem when I had to update an Umbraco site that was running fine on a 2008 Server.
To be on the safe side, I took a local copy and set it up on my PC (which runs Vista).

When I tried to run the site, it would work, but none of the images or style sheets would load.  I’ve had similar problems in the past so I thought I would just log into the CMS and republish the site. When I tried this, the welcome page would not display properly either and I could not log in:



After ruling out a problem with permissions or the Client Dependancy cache I checked the request console in firebug. Every css, js and image file being requested was returning a “500 internal server error”.

Basically every request that was not for a .net page was getting a configuration error, so I checked the web.config for anything out of place. After a bit of trial and error I found removing this section fixed it:



 

The site had been setup in Windows Server 2008 and a new mime-type had been added in IIS.

This shouldn’t be a problem viewing the site on Vista as they should both be using the same version of IIS. Also, the file extension had not already been added as a global mime type.

I’m not sure if this is a problem specific to Umbraco sites running on Vista. I’ll have to try and test on a blank site to see.