Copied to clipboard

Flag this post as spam?

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


  • SinkyPars 132 posts 175 karma points
    Sep 09, 2010 @ 16:39
    SinkyPars
    0

    Document.BeforeMoveToTrash

    Hi guys,

    This seems to kinda work:

     public AppBase()
            {
               
                Document.BeforeMoveToTrash += new Document.MoveToTrashEventHandler(Document_BeforeMoveToTrash);

                Document.AfterMoveToTrash +=  new Document.MoveToTrashEventHandler(Document_AfterMoveToTrash);

                Document.BeforeUnPublish += new Document.UnPublishEventHandler(Document_UnPublish);
             
                
            }

        void Document_BeforeMoveToTrash(Document sender, MoveToTrashEventArgs e)
            {

            
                e.Cancel = true;
            
               
               
                           
               
            }

     

    However it seems to unpublish the page but the Document_AfterMoveToTrash and Document_UnPublish events never get fired.

    Has anyone had this issue before?

    Maybe suggest a work around?

     

    Thanks

     

    Scott

     

  • SinkyPars 132 posts 175 karma points
    Sep 09, 2010 @ 19:10
    SinkyPars
    0

    Is this a bug in version 4.0.4.2?

    Am I hooking into this event properly using a class in app code?

    I am tearing my hair out over this :(

     

  • Sascha Wolter 615 posts 1101 karma points
    Sep 09, 2010 @ 21:12
    Sascha Wolter
    0

    Hi Scott,

    not 100% sure but remember there were a couple of issues around certain events not being fired in 4.0.x. Should be somewhere here on the forum.

    Hope that helps somehow,

    Sascha

Please Sign in or register to post replies

Write your reply to:

Draft