Copied to clipboard

Flag this post as spam?

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


  • Angus 34 posts 128 karma points
    Aug 27, 2016 @ 22:37
    Angus
    0

    Cancelling ContentService Saving Event ('Received an error from the server')

    Using 'e.CancelOperation' in ContentService.Saving event handler gives rise to 'Object reference not set to an instance of an object.' error : the save operation is actually cancelled but the backend is redirected to '/umbraco/#/content/content/edit/0' generating the error.

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

    (7.4.2)

  • Ulrich Wagner Gade Ebsen 127 posts 277 karma points
    Sep 11, 2017 @ 13:22
    Ulrich Wagner Gade Ebsen
    0

    Hi Angus,

    Did you find fix for this?? I'm facing the same issue...

    /ulrich

  • Angus 34 posts 128 karma points
    Sep 11, 2017 @ 17:02
    Angus
    0

    Hi Ulrich,

    Not really a 'fix' but a workaround: in the event handler, setting the id of the cancelled entity to that of its parent prior to cancelling the event prevents the error. (Only required where the HasIdentity property is false.)

    /Angus

Please Sign in or register to post replies

Write your reply to:

Draft