Skip to content

Entity Saving Notification - Entity.Before Shows the After State #174

Open
@jho-md

Description

@jho-md

Describe the bug
When registering a notification handler for an entity saving notification, the Before object incorrectly stores the After state of the object.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Configure a collection of entities.
  2. Register a notification handler for saving that entity.
  3. Set breakpoints in the notification handler to inspect the Before and After objects.
  4. Go to the UI and modify the name for a particular entity, something like "Modified Entity".
  5. Save the entity.
  6. Once the breakpoints are hit, see that the Before and After objects are the same, the Before object has the name "Modified Entity".

Expected behavior
Only the After object should have the updated state.

Screenshots

Image
Image

Environment (please complete the following information):

  • Server OS: Windows
  • Browser: Chrome
  • Umbraco Version: 15.3.0
  • Product Version: 15.1.4

This item has been added to our backlog AB#53503

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions