-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix copy content with descendants not copying sort order (#13464) #13644
Conversation
Hi there @ustadstar, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Hello @ustadstar, Thanks a lot for providing a solution for this annoying problem 👍 Cheers! |
Hi @mikecp - is it possible to merge this into the v10 code as well? (I hope this is what the Long Term Support means) |
Hi @JoseMarcenaro, Pinging @nul800sebastiaan on this one to decide 😁 Cheers! |
Hi @nul800sebastiaan - Allow me to argue my case a little bit 😁
This kind of issue makes it hard for us to sustain the decision of a new major version upgrade, if the v10 upgrade got us into trouble.... Thanks a lot! |
Cherry picked for 10.5 in 0ba1254 |
Yay! Thanks @nul800sebastiaan ! |
Prerequisites
If there's an existing issue for this PR then this fixes #13464
Description
This PR fixes the issue with copy content not preserving the sort order of the content items.
I have added a SortOrderExists function to the code, to check if the sort order already exists in the tree. This was necessary because otherwise the first parent item which we want to copy would not have a new sort order on the main tree.
Steps to test and reproduce the issue are greatly documented in the issue. I have copied the steps to reproduce down below.
❗NOTE: With this PR the structure on the image right should match the copied content structure of the left image.