Copied to clipboard

Flag this post as spam?

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


  • Dan Patching 31 posts 158 karma points c-trib
    Aug 12, 2016 @ 15:46
    Dan Patching
    0

    Cancelling Create in a Document Event

    Hi,

    I have a document event defined for ContentService.Creating so that I can stop content editors creating duplicate content node names for a specific document type, and give them a notification about what happened.

    That is all working fine, but I get an additional error notification because although the "Create" was cancelled, the page has tried to redirect to /umbraco/#/content/content/edit/0 afterwards.

    Is this a known issue? or does anyone know a work around without hacking the core?

    Thanks for any help.

  • Angus 34 posts 128 karma points
    Aug 27, 2016 @ 23:26
    Angus
    0

    Hi Dan,

    Experiencing the same issue when cancelling the ContentService.Saving event : the save is cancelled but the backend redirects to /umbraco/#/content/content/edit/0 as per your own case.

    (Not ideal but I found that setting the id of the cancelled item to that of its parent prior to cancelling the event prevented the error.)

    A

Please Sign in or register to post replies

Write your reply to:

Draft