Fix - topological sort, - key not matching internally.#803
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a topological sorting issue in the uSync.BackOffice where the key used in OrderedNodeInfo wasn't matching the key used internally for XML elements, causing import order problems.
- Simplifies the key generation in OrderedNodeInfo to use the node's native key directly
- Removes the composite key format that included local path information
- Ensures consistency between node keys and graph edge keys for proper topological sorting
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
alexsee
pushed a commit
to alexsee/umbraco-container
that referenced
this pull request
Sep 28, 2025
Updated [uSync](https://github.com/KevinJump/uSync) from 16.0.4 to 16.0.5. <details> <summary>Release notes</summary> _Sourced from [uSync's releases](https://github.com/KevinJump/uSync/releases)._ ## 16.0.5 This is a patch release for uSync v16 for Umbraco v16 - it contains some fixes to reported issues. ## What's Changed * add missing translations for summary (over 1000) titles in report das… by @KevinJump in KevinJump/uSync#796 * add waiting state to the import upload button. by @KevinJump in KevinJump/uSync#797 * Fix #800 Add blockItemConverters by @KevinJump in KevinJump/uSync#801 * V16/new trash handling by @KevinJump in KevinJump/uSync#802 * Fix - topological sort, - key not matching internally. by @KevinJump in KevinJump/uSync#803 **Full Changelog**: KevinJump/uSync@v16.0.4...v16.0.5 Commits viewable in [compare view](KevinJump/uSync@v16.0.4...v16.0.5). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an issue where the sort order for the import of doctypes was wrong.
When we introduced routes we updated the key used in the
OrderedNodeInfoclass to include the local path, so it would be unique between folders - except it doesn't have to be anymorethe knock on effect of this was the OrderedNode had a unique key which was then different from the internal Key value on the XML element.
the key on the XML element was the one being added to the
GraphEdgeclasses which go in to doing the sort (based on composition dependencies). but because the node and edge keys where coming from diffrent places we never ended up with the correct match so the topolgical sort would fail and the level sort becomes the default.this is less then ideal for compoitions as they are often deeper down the tree than the content pages that use them. so this can cause issues with imports (especially on shared tabs).
turns out v13 tollorates this (e.g it doesn't mind if you create the property in a tab before you have actually created the tab in dependent content type). but v15+ does not :( .
this fixes that