Is it bad that I just acheived inbox-zero by deleting all my emails?

follow me on

Umbraco with Windows Live Writer integration: the dangers

Sunday, March 29, 2009 by David Conlisk

Yesterday I upgraded the Web Garden site to Umbraco v4.0.1. I added some blog entries, and twittered about them, and even had some comments from some members of the Umbraco community. I come in this morning, and my site's totally screwed. It kept redirecting you to the /config/splashes/noNodes.aspx page, even though in the admin section all of the pages were there.

I checked over everything. I checked all my Plesk permissions. I checked that all of the v4.0.1. files had been updated correctly. I republished the whole site. Repeatedly. I checked the umbracoLog table in the database. And there it was. An xml error:

Xml wasn't saved: System.Xml.XmlException:
Invalid XML document, The document does not have a root element..
at System.Xml.XmlDocument.Save(String filename)
at umbraco.content.SaveContentToDisk(XmlDocument xmlDoc)

And it also turns out that the data/umbraco.config file didn't exist.

Here's what I think happened. When I was testing Live Writer integration, I kept getting errors to do with special characters, specifically where single, straight quotes were being converted to "smart" quotes, and my dashes were becoming other characters that were in fact invalid characters to include in xml. The blog entries were appearing in Umbraco, but Live Writer was crapping out on me.

I deleted the offending files in Umbraco and messed about with the settings in Live Writer. I'm using Windows Live Writer 2009, and there are a couple of options that you need to check:

Go to Tools -> Options... and choose the Editing tab

Uncheck the following options:

- Replace hyphens (--) with dash (-)

- Replace "straight quotes" with "smart quotes"

- Replace other special characters

Save your changes. This will prevent Live Writer from uploading invalid xml characters to your Umbraco site. Because the Umbraco content tree is stored as xml, these characters can break your whole site.

My site was down until I emptied the recycle bin at which point the invalid characters were finally purged from the site, and the data/umbraco.config file could be written to disk correctly (at least, that's my theory at this point!). This is the site structure stored as xml, and if there are invalid characters, then it won't get written correctly to disk.

I hope that this helps you if you're having similar issues, or just configuring Live Writer for client use. Now that these issues have been ironed out, I'll still be using Live Writer to blog with ahead of the built-in rich-text editor - it's just so much easier.

Cheers,

David

Bookmark and Share

0 comment(s) for “Umbraco with Windows Live Writer integration: the dangers”

Please leave a comment: