KevinJump / uSync

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

Data loss when changing & removing property editor at once #511

Closed wtct closed 1 year ago

wtct commented 1 year ago

Hi!

I would like to let you know that we have noticed critical bug causing a real issue.

Unfortunately, data will be loss when changing property editor for any property & removing the obsolete property editor at once.

Let me share the steps to reproduce by simple example. I hope you will understand the case.

Steps to reproduce the behavior:

  1. Create Test DocType with Title property of new Textstring 1 DataType.
  2. Create a Test node of this new type.
  3. Enter any title and save the node.
  4. Create Textstring 2 DataType.
  5. Change DataType of Title property to Textstring 2.
  6. Delete Textstring 1 DataType.
  7. Commit uSync files.
  8. Deploy changes to other ENV.
  9. Run uSync import.
  10. Open Test node and check the title entered in Title property.

Expected behavior Entered title should be persisted.

Unfortunately Title property is empty after importing uSync changes as described above on other ENV.

In my opinion It's caused by wrong order of applying changes to database.

I understand that some DataType's changes have to be applied before applying changes to DocTypes but there is a corner case which should be handled.

It seems the DataType deleting should be skipped until DocType changes are applied.

Best regards!

cc: @piotrbach

KevinJump commented 1 year ago

Hi,

Just wanted to let you know - we haven't completely ignored this one, we've been thinking about it a lot.

moving the deletes to the end - is probibly the thing ,but there are lots of other processes and possiblities and we just need to confirm they all work.

For example what happens if someone creates "datatype a" - deletes it another day, and then a month later creates a new "datatype a" . In default configuration this is fine, we track replace, overwrite etc.

I suspect we will probably be ok - but we need to test. etc. Also uSync.Complete 😨 - I think it might be ok as it does deletes another way,

but we haven't forgotten this - we're looking.

(also we are doing this in v12 first, that doesn't mean we won't back port it to v10 (and v8) - it just starts latest first and gets picked down the tree).

wtct commented 1 year ago

Hi @KevinJump for solving this issue.

Can I have I question?

Did you know about this issue before I posted it here?

cc: @piotrbach

KevinJump commented 1 year ago

hi @wtct -

I don't think we did, and i don't think it has been reported before.

Kevin

KevinJump commented 1 year ago

released in v8.11.13 , v10.6.2 and v12.1.0

wtct commented 1 year ago

@KevinJump Is it planed to be released for v11?

cc: @piotrbach

KevinJump commented 1 year ago

Hi,

Yes, but as Umbraco 11 goes into Security only updates from 1st September - uSync v11 will follow suit.

So we are aiming to do a final single 'support' v11 released that later in the month to capture any final changes before the move to Security only updates.

wtct commented 1 year ago

Thanks @KevinJump for letting us know!

I hope finding & solving this issue has a good impact for your product feedback.

@piotrbach