Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ryan Rueckl 17 posts 74 karma points
    Nov 12, 2015 @ 21:33
    Ryan Rueckl
    0

    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?

  • Jason Prothero 422 posts 1243 karma points c-trib
    Nov 13, 2015 @ 17:52
    Jason Prothero
    0

    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

  • Ryan Rueckl 17 posts 74 karma points
    Nov 13, 2015 @ 22:24
    Ryan Rueckl
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft