uSync error on Force Import

We think this might be something to do with a file being deleted and then recreated (therefore with a different ID - but probably the same name).

ContentHandler Import Fail: The UPDATE statement conflicted with the REFERENCE constraint “FK_umbracoDocumentUrl_umbracoNode_uniqueId”. The conflict occurred in database “LPSSelfServicePortal”, table “dbo.umbracoDocumentUrl”, column ‘uniqueId’. The statement has been terminated.

We recieve the above error upon uSync > Import (Force) and our guess that it might be something to do with the same file name but a new ID.

The file won’t update and stays on the old version (with the old ID)
We’re using version 15.4.2

Hi,

trying to work this out :thinking:

TL:DR;
Not sure how this has happened do you have any more information about the node that is failing (is it a child of something, was it moved at anypoint?) .

uSync should pick this up, but maybe search the uSync folders for things with the same Key ? see if there is anything in the content bit that maybe might conflict (it should only be key, but might be worth checking)

Details
(feel free to ignore my ramblings, but if any of this makes you go ‘oh, maybe…’ then that might help)

A delete and rename should be ok, because something with the same name but a different key (or even a diffrent name but the same key!) will sync - because the old thing will either be over written or moved.

so if you delete something and re-create it - the it “should” be ok. - because the change is updated

uSync doesn’t directly talk to the DB (everything is via the APIs), so no direct stuff into that table but i’ve just looked and that table will have mutple entries per node, normally. and so when things get updated they go into it.

The Forign Key constraint on this will be that the uniqueId value must exist in the Node table (the one with all the nodes in). so how something can end up in this table and not that one is quite the mystery.