Copied to clipboard

Flag this post as spam?

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


  • Gordon Saxby 1347 posts 1608 karma points
    Jan 25, 2016 @ 10:26
    Gordon Saxby
    0

    No "You have unsaved changes" message

    I am writing an event handler for ContentService.Saving which checks the content of certain fields. If anything invalid is found, I am using "CancelOperation" to cancel the save and output a message to the user.

    That part is working OK, however, I am not getting the "You have unsaved changes" message. I do get the message if I make a change and navigate away from the page without trying to save (and therefore triggering my validation code).

    If I get my "invalid" message and then navigate away from the page, then all changes are lost.

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Jan 31, 2016 @ 17:43
    Jeroen Breuer
    0

    Hello,

    The "You have unsaved changes" probably checks if you haven't pressed the save button. Since you did press the save button it's assuming that everything is saved even though you canceled saving in an event.

    The "You have unsaved changes" message is probably some client side check and doesn't check anything server side.

    Too be honest the "You have unsaved changes" message has more issues: http://issues.umbraco.org/issues/U4?q=discard+changes

    Jeroen

  • 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.

Please Sign in or register to post replies