I have a .NET(C#) script which is pulling news articles from an XML file. Everything works fine, but when it comes to publishing them, and appearing on the web page, something's not quite right.
Here's the code so far:
try {
newNode.Save();
newNode.Publish(User.GetUser(0)); //0 is default user
}
catch (Exception ex) {
// error message
}
umbraco.library.UpdateDocumentCache(newNode.Id);
As you can see, what I'm trying to publish is newNode. It's first saved and then published through User 0, which has publishing rights, and then the document cache is updated. The problem is that it appears in the back end of Umbraco, but the document link is simply a single hash (#), and it doesn't display on the web page.
Can anyone suggest why this method of publishing wouldn't work?
Edit: Should have mentioned, I'm using Umbraco 4.7.1