Copied to clipboard

Flag this post as spam?

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


  • James C 17 posts 138 karma points
    Apr 05, 2018 @ 15:43
    James C
    0

    ContentService.Unpublish listener does not pick up on scheduled unpublish

    I am using Umbraco v 7.7.9. I have a class that listens for the unpublished event firing and performs some actions when it does. It works perfectly when content nodes are manually unpublished however, when I set content for scheduled unpublish it is not picked up. Here's my code:

        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            // Hook on to the content node unpublish event firing
            ContentService.UnPublished += ContentServiceUnPublished;
        }
    
        private void ContentServiceUnPublished(IPublishingStrategy sender, PublishEventArgs<IContent> args)
        {
            // Do something 
        }
    

    Should this be the case? And if it is, is there something else I can do to pick up scheduled unpublish?

    Thank you in advance.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 06, 2018 @ 09:24
    Dave Woestenborghs
    0

    Hi James,

    Can you try to reproduce this on the latest version of Umbraco.

    If so you can create a issue on http://issues.umbraco.org

  • James C 17 posts 138 karma points
    Apr 06, 2018 @ 10:00
    James C
    0

    Hi Dave,

    No problem, I'll try that tonight thanks.

Please Sign in or register to post replies

Write your reply to:

Draft