Publish At not calling ContentService.Published event
Whenever I use the Publish At option in the backoffice, it does not fire any of my extended Save/Publish events. These events are used to insert/update some data in a custom SQL table. I have some logging in each event that gets called correctly upon manually Saving the data (with a scheduled publish date), but when the node does publish, nothing gets logged.
The bigger and weirder problem is that my custom data ends up getting duplicated after the node publishes, even though my code seemingly never gets called (I've even put in Event Viewer logging to make sure it wasn't a thread issue).
Since it is a totally custom table, I'm completely baffled as to how it is duplicating the data. Any ideas how I can figure out what is duplicating this data? Or any ideas why my Save/Publish event code is not getting called from a scheduled publish?
I don't think it's actually getting fired at all upon publish.
I have debug statements in 4 different ContentService events (ContentService.Saving, ContentService.Saved, ContentService.Publishing, & ContentService.Published) that log to the Windows Event viewer. The 2 saving/saved events correctly enter the debug statements, but that's it. No other debug statements show up after the publish is done.
I am running it locally with some breakpoints, and the breakpoints in the saving/saved events gets hit when I first save the content, but nothing else gets hit when the publish happens.
Publish At not calling ContentService.Published event
Whenever I use the Publish At option in the backoffice, it does not fire any of my extended Save/Publish events. These events are used to insert/update some data in a custom SQL table. I have some logging in each event that gets called correctly upon manually Saving the data (with a scheduled publish date), but when the node does publish, nothing gets logged.
The bigger and weirder problem is that my custom data ends up getting duplicated after the node publishes, even though my code seemingly never gets called (I've even put in Event Viewer logging to make sure it wasn't a thread issue).
Since it is a totally custom table, I'm completely baffled as to how it is duplicating the data. Any ideas how I can figure out what is duplicating this data? Or any ideas why my Save/Publish event code is not getting called from a scheduled publish?
My guess if the data is getting duplicated is that your event is getting fired twice and you're inserting twice.
Not sure about the publishing issue. Are you able to debug using breakpoints locally?
-Jason
Hi Jason,
I don't think it's actually getting fired at all upon publish.
I have debug statements in 4 different ContentService events (ContentService.Saving, ContentService.Saved, ContentService.Publishing, & ContentService.Published) that log to the Windows Event viewer. The 2 saving/saved events correctly enter the debug statements, but that's it. No other debug statements show up after the publish is done.
I am running it locally with some breakpoints, and the breakpoints in the saving/saved events gets hit when I first save the content, but nothing else gets hit when the publish happens.
I'm completely baffled.
is working on a reply...