Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete should be executed before adding new files #241

Open
PhyxionNL opened this issue Sep 5, 2024 · 2 comments
Open

Delete should be executed before adding new files #241

PhyxionNL opened this issue Sep 5, 2024 · 2 comments

Comments

@PhyxionNL
Copy link

PhyxionNL commented Sep 5, 2024

Describe the bug
Say you have a folder with files named 1, 2, and 3. Remove these, and upload three new ones also named 1, 2, and 3. Push this folder to destination, what uSync does is first create these files so they're now named 1 (1), 2 (1) and 3 (1). Then the original 1, 2, 3 are removed.
You now need to push twice to fix the names.

Version (please complete the following information):

  • Umbraco Version: 13.2.2
  • uSync.Complete Version: 13.1.5

To Reproduce
Steps to reproduce the behavior:

  1. See description.

Expected behavior
Execute delete before adding new items.

@KevinJump
Copy link
Member

yeah we will need to look, we have the opposite issues also (delete should happen last).

if the deletes happen before the updates then content that might be in the folders would be deleted, (so it needs to be moved out of the folders via its own saves before the deletes then happen).

We do have some dependency graph stuff in there but not for deletes before saves, because we are not running it as a full event audit log (e.g we only know what we have been sent, at push time, not all the actions that might have happened in between). its hard for us to say, oh this was all moved then this was deleted.

TLDL: We will look to see what we can do.

@PhyxionNL
Copy link
Author

There are probably cases where a delete should happen last, but I don't think that's logical here.
If I sync content from X to Y, I would expect that Y becomes identical to X. If a node already exists with the same name, it should be removed as otherwise you'll get some mishmash. Renaming to ... (1) is probably not something someone ever wants, especially for newly added content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants