uSync
uSync copied to clipboard
Add cleanup in DocumentUrl tables when the content key changes.
Workaround for https://github.com/umbraco/Umbraco-CMS/issues/21131.
When a content item's Key changes during an import - Umbraco throws an ForeignKey exception because of the bindings to the umbracoDocumentUrl table.
This PR checks on key changes, and removes entries from that table (via the repository). - so the conflict doesn't happen.
On Save Umbraco puts new entries in the table with the new Key so this "should" be ok.
[!WARNING] (Breaking - changes the Constructor for the
ContentSerializerclass)