GetDirtyProperties() and IsPropertyDirty() methods do not work as expected
When some content node is saved in Umbraco, I want to catch the ContentService.Saving event and append the next logic:
Check if at least one property from a list of properties I defined in advance, is dirty (the value changed during the save).
If there are any, do something like logging.
In order to achieve the behavior of the first point, I'm trying to use Umbraco's GetDirtyProperties() or IsPropertyDirty() methods, to check which properties are dirty or now. The problem is that even without making any changes, some properties are marked as dirty, even though their values weren't changed at all!
From what I noticed, those problematic properties are especially empty textstrings / multinode pickers data typed properties (and maybe there are more types which I didn't noticed).
I've found this bug that may be related, however no one addressed it - https://github.com/umbraco/Umbraco-CMS/issues/11683.
This problem is crucial for me and prevents me from achieving the logic I need for my system requierments.
Is there something I can do? Any workaround?
GetDirtyProperties() and IsPropertyDirty() methods do not work as expected
When some content node is saved in Umbraco, I want to catch the
ContentService.Saving
event and append the next logic:In order to achieve the behavior of the first point, I'm trying to use Umbraco's
GetDirtyProperties()
orIsPropertyDirty()
methods, to check which properties are dirty or now.The problem is that even without making any changes, some properties are marked as dirty, even though their values weren't changed at all!
From what I noticed, those problematic properties are especially empty textstrings / multinode pickers data typed properties (and maybe there are more types which I didn't noticed).
I've found this bug that may be related, however no one addressed it - https://github.com/umbraco/Umbraco-CMS/issues/11683.
This problem is crucial for me and prevents me from achieving the logic I need for my system requierments.
Is there something I can do? Any workaround?
Umbraco version - 8.2.2
is working on a reply...