I get this error in the log when Publish At is run.
But not when manually published
Error publishing node: System.NullReferenceException: Object reference not set to an instance of an object. at umbraco.presentation.UmbracoContext.get_Current() at umbraco.library.GetXmlNodeById(String id) at UmbracoExamine.ContentExtensions.ToXDocument(Content node, Boolean cacheOnly) at UmbracoExamine.UmbracoEventManager.content_AfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) at umbraco.content.DocumentCacheEventHandler.Invoke(Document sender, DocumentCacheEventArgs e) at umbraco.content.FireAfterUpdateDocumentCache(Document sender, DocumentCacheEventArgs e) at umbraco.content.UpdateDocumentCache(Document d) at umbraco.content.UpdateDocumentCache(Int32 pageId) at umbraco.library.UpdateDocumentCache(Int32 DocumentId) at umbraco.presentation.publishingService.CheckPublishing(Object sender)
IMHO, it should behave exactly the same, regardless of the publishing mechanism.. Add this issue to Codeplex if it isn't already listed in there. Also mention what umbraco version you're on.
Hi. It seems to be an issue that's been already mentioned on this forum. As far as I understand it's connected to the fact that scheduled publishing goes on inside a separate thread that is not a regular asp.net thread. Since that anything that depends on http request processing like cookies/session state and so on causes the process to fail. And actually, in your stack trace it's the umbraco.presentation.UmbracoContext.get_Current() call that seems to rely on existance of a cookie (like UMB_CONTEXT or like this - here I'm not sure for 100%).
I think Rodion is right that there is no HttpContext in the Publish At calls. Not sure what you are doing with it but I think I saw in another thread a similar issue with a datatype trying to use MapPath, along with a replacement (HostingEnvironment.MapPath).
Difference between manual publish and Publish At ?
Hey Fellow Umbraconeers
I've created an event, i want fired, whenever a Document of a specifik ContentType is published.
When manually published, the event is fired, and my method, does whatever my method should do.
But when I set a "Publish At" the event isn't fired, and my methpd isn't run.
The Document is published, but event isn't fired
This is obviously not all the code, but just the basics.
I do some checkup on sender.ContentType before continuing.
Any comments ??
Best Regards
Kristoffer
I get this error in the log when Publish At is run.
But not when manually published
Ok this happens on every node where I set a publish at date. Not just this specific type.
I commented out the event, so there should not be any custom code which interfere. Is there an issue with Publish At ??
IMHO, it should behave exactly the same, regardless of the publishing mechanism.. Add this issue to Codeplex if it isn't already listed in there. Also mention what umbraco version you're on.
Cheers,
/Dirk
Hi. It seems to be an issue that's been already mentioned on this forum. As far as I understand it's connected to the fact that scheduled publishing goes on inside a separate thread that is not a regular asp.net thread. Since that anything that depends on http request processing like cookies/session state and so on causes the process to fail. And actually, in your stack trace it's the umbraco.presentation.UmbracoContext.get_Current() call that seems to rely on existance of a cookie (like UMB_CONTEXT or like this - here I'm not sure for 100%).
I think Rodion is right that there is no HttpContext in the Publish At calls. Not sure what you are doing with it but I think I saw in another thread a similar issue with a datatype trying to use MapPath, along with a replacement (HostingEnvironment.MapPath).
damn....I was using MapPath.....
Will try the suggested solution, and get back to you..
HostingEnvironment did the job.
Thank you
is working on a reply...