KevinJump / uSync

Database syncing tool for Umbraco CMS
https://jumoo.co.uk/usync/
Mozilla Public License 2.0
109 stars 63 forks source link

Renaming doctypes/datatypes breaks settings import due to "duplicate key" #647

Closed kdx-perbol closed 3 months ago

kdx-perbol commented 4 months ago

Describe the bug When we rename doctypes and datatypes, uSync keeps a change=rename file for the old name and a regular file for the new name. When importing this, uSync fails because of "duplicate key" and raises an import-stopping health issue.

To Reproduce Steps to reproduce the behavior:

  1. Configure uSync to exportOnSave
  2. Create some doctypes & datatypes
  3. Rename them
  4. Observe change=rename uSync files & regular uSync files for the renamed items
  5. Try to import them somewhere
  6. uSync > Settings > Import > "Duplicate key" error

Expected behavior Target uSync updated to match source uSync, i.e., if an item has been renamed, the item should import with the new name to the target uSync regardless of whether the item existed in the target uSync at import time, i.e., standard uSync import behavior

Screenshots AI-generated image of someone manually removing all change=rename uSync files here while cursing at the screen

About your Site (please complete the following information):

Additional context

KevinJump commented 4 months ago

Hi, do you happen to know if you are seeing this on the v latest version of v13 ? (v13.2.3) just because we did do some stuff around this in the last couple of releases.

(I will test, but just checking)

KevinJump commented 4 months ago

this doesn't seem to happen on v13.2.3 .