From b1ce3c9e2333e2fe33779904fe5492bceaba1e20 Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Wed, 22 Apr 2026 10:36:14 +0100 Subject: [PATCH] Fixes: #949 - only do the full update on blank EditorUIAlias values, lookup and check the serializer for all other ones (so the serializer has to be explicity set on migrated ones). --- .../Serializers/DataTypeSerializer.cs | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/uSync.Core/Serialization/Serializers/DataTypeSerializer.cs b/uSync.Core/Serialization/Serializers/DataTypeSerializer.cs index 4be86480..71860a86 100644 --- a/uSync.Core/Serialization/Serializers/DataTypeSerializer.cs +++ b/uSync.Core/Serialization/Serializers/DataTypeSerializer.cs @@ -137,12 +137,24 @@ protected override async Task> DeserializeCoreAsync(XElem var editorUiAlias = info?.Element("EditorUIAlias").ValueOrDefault(string.Empty) ?? string.Empty; - // EditorUIAlias is often not set on migrations, so we need to go get it. - // Also for updates (like RTE to TipTap) then this value needs to change. - // so if it's blank or if fetching it gets us a new value, we should update it. - var newEditorUiAlias = ToPropertyEditorUiAlias(item.EditorAlias) ?? string.Empty; - if (string.IsNullOrWhiteSpace(editorUiAlias) || string.IsNullOrWhiteSpace(newEditorUiAlias) is false) - editorUiAlias = newEditorUiAlias; + if (string.IsNullOrWhiteSpace(editorUiAlias) is true) + { + // EditorUIAlias is often not set on migrations, so we need to go get it. + var newEditorUiAlias = ToPropertyEditorUiAlias(item.EditorAlias) ?? string.Empty; + if (string.IsNullOrWhiteSpace(newEditorUiAlias) is false) + editorUiAlias = newEditorUiAlias; + } + else + { + // we should always check to see if the serializer has an option on + // what the editor UI alias should be. This is because some serializers + // might want to change the editor UI alias (e.g - RTE to TipTap) + // without changing the editor alias, so we need to check for that here + // and update it if needed. + var newEditorUiAlias = GetEditorUIAliasFromSerializer(editorAlias); + if (newEditorUiAlias is not null) + editorUiAlias = newEditorUiAlias; + } if (item.EditorUiAlias != editorUiAlias) {