The doc will then be displayed properly in the umbraco treenode under contents BUT it has no URL so it cannot be requested. What am I doing wrong? Any ideas?
I appreciate any help
Thanks
Christo
PS:I'm using Umbraco 4.5.2
PPS:also tried
doc.XmlGenerate(new XmlDocument()); after publishing - no improvement
Does the parent document have a valid url ? and instead of clearing the document cache and refreshing, does library.UpdateDocumentCache(doc.Id); have any effect ?
API published Docs have no URL
Hi there,
I currently experience following problem:
I generate via API new Documents ( via Document.MakeNew()) and publish it after that:
doc.Publish(User.GetUser(0));
umbraco.content.Instance.ClearDocumentCache(doc.Id);
library.RefreshContent();
The doc will then be displayed properly in the umbraco treenode under contents BUT it has no URL so it cannot be requested. What am I doing wrong? Any ideas?
I appreciate any help
Thanks
Christo
PS:I'm using Umbraco 4.5.2
PPS:also tried
doc.XmlGenerate(new XmlDocument()); after publishing - no improvement
Hi,
After this line
add this
You do not need these lines
Rich
Hi Christo,
Does the parent document have a valid url ? and instead of clearing the document cache and refreshing, does library.UpdateDocumentCache(doc.Id); have any effect ?
Cheers,
Hendy
@Hendry, the parent has a valid URL, yes
@Rich:well, yes- I tried the plain code too. without success
Hi Rich, Handy,
your suggestion did it:
Thanks a lot!
is working on a reply...