Revive uSync.Community.DataTypeSerializers - #1052
Merged
Merged
Conversation
…new serializers Convert SyncDataTypeSerializerBase's guid/path lookups (UdiToEntityPath, GuidToEntityPath, PathToUdi, PathToGuid, FindItem) to a Try* pattern instead of relying on empty-string/null sentinels for failure. Add/update editor config serializers that map node references to portable entity paths on export and back to guids on import: - ContentPickerConfigSerializer (startNodeId) - MediaPicker3ConfigSerializer (startNodeId) - MNTPickerConfigSerializer (startNode.id, startNode.dynamicRoot.originKey, the latter only mapped when present) - RichTextConfigSerializer (mediaParentId) - new, defensively copies the configuration dictionary before mutating since other serializers for the same editor (e.g. uSync.Core's RichTextEditorMigratingSerializer) can hand back a read-only ImmutableSortedDictionary.
Owner
Author
KevinJump
added a commit
that referenced
this pull request
Aug 27, 2026
…new serializers (#1052) (#1053) Convert SyncDataTypeSerializerBase's guid/path lookups (UdiToEntityPath, GuidToEntityPath, PathToUdi, PathToGuid, FindItem) to a Try* pattern instead of relying on empty-string/null sentinels for failure. Add/update editor config serializers that map node references to portable entity paths on export and back to guids on import: - ContentPickerConfigSerializer (startNodeId) - MediaPicker3ConfigSerializer (startNodeId) - MNTPickerConfigSerializer (startNode.id, startNode.dynamicRoot.originKey, the latter only mapped when present) - RichTextConfigSerializer (mediaParentId) - new, defensively copies the configuration dictionary before mutating since other serializers for the same editor (e.g. uSync.Core's RichTextEditorMigratingSerializer) can hand back a read-only ImmutableSortedDictionary.
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.
Summary
SyncDataTypeSerializerBase's guid/path lookups to aTry*pattern (TryUdiToEntityPath,TryGuidToEntityPath,TryPathToUdi,TryPathToGuid,TryFindItem) instead of relying on empty-string/null as failure sentinels.ContentPickerConfigSerializerandMediaPicker3ConfigSerializerto use the newTry*methods, mappingstartNodeIdto a portable entity path on export and back to a guid on import.MNTPickerConfigSerializerto mapstartNode.idandstartNode.dynamicRoot.originKey(the latter only when present, since it isn't always set) the same way.RichTextConfigSerializermappingmediaParentId, filling a gap left byuSync.Core's built-inRichTextEditorMigratingSerializer(which only normalizes the value on import, never maps it to/from a portable path). Defensively copies the configuration dictionary before mutating, since serializers for the same editor run in a chain andRichTextEditorMigratingSerializercan hand back a read-onlyImmutableSortedDictionary.Test plan
dotnet build uSync.Community.DataTypeSerializersuSyncSource.Site/uSync/v17/DataTypes/(ContentPicker, MediaPicker, MultiNodeTreePicker, MultiNodeTreePickerPlus, RichText) on a running Umbraco instance🤖 Generated with Claude Code