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

Media sync does not keep the correct hierarchy with folders (container) and media items (items) #246

Open
ja0b opened this issue Oct 25, 2024 · 3 comments

Comments

@ja0b
Copy link

ja0b commented Oct 25, 2024

Bug
When syncing a media folder, the result in the destination server is an empty folder with all the media items at the root level.
A second sync is required to fix the order of the items. Maybe this is due to the fact that it looks like the folder is being created last.

1 - Using the "Push to..." option, it shows that the "Test" folder is being created last.
Screenshot 2024-10-24 185657

2 - When the migration is done, the media item is outside the folder.
Screenshot 2024-10-24 185821

3 - Second sync fixes the hierarchy issue
Screenshot 2024-10-24 185859

4 - Media item exported correctly
Screenshot 2024-10-24 185934

Version (please complete the following information):

  • Umbraco Version: 13.5.2
  • uSync Version: 13.2.5
  • uSync.Complete Version: 13.1.7

Expected behavior
Keep the order/hierarchy of the media items in the destination server after the sync process is done.

@KevinJump
Copy link
Member

Hummm 🤔 hard one to track down this one, as it works here,

Do you happen to have more than 100 folders at that level ?

uSync does ordering based on level, but also based on folder sort order (i think there is a point where we combine the two). it might be we at tripping over that. (although to be honest we did change quite a lot of this code in v13 and i thought we where not doing it that way anymore 🙂 )

@KevinJump
Copy link
Member

its actually 1000. so if somehow the folder has a sort order of higher than 1000, it could possibly trip over the item being imported.

https://github.com/KevinJump/uSync/blob/v14/dev/uSync.BackOffice/Services/uSyncService_Single.cs#L390-L393

@ja0b
Copy link
Author

ja0b commented Oct 26, 2024

On point! The sort order is actually 2576 here.

image

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