Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
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 :(
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
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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
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 :(
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
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.