Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/Umbraco.Core/Services/EntityXmlSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public XElement Serialize(IDataType dataType)
xml.Add(new XAttribute("EditorUiAlias", dataType.EditorUiAlias ?? dataType.EditorAlias));
xml.Add(new XAttribute("Definition", dataType.Key));
xml.Add(new XAttribute("DatabaseType", dataType.DatabaseType.ToString()));
xml.Add(new XAttribute("Configuration", _configurationEditorJsonSerializer.Serialize(dataType.ConfigurationObject)));
xml.Add(new XAttribute("Configuration", SerializeDataTypeConfiguration(dataType)));

var folderNames = string.Empty;
var folderKeys = string.Empty;
Expand Down Expand Up @@ -708,4 +708,14 @@ private void SerializeChildren(IEnumerable<IMedia> children, XElement xml, Actio
}
}
}

/// <summary>
/// We have two properties containing configuration data:
/// 1. ConfigurationData - a dictionary that contains all the configuration data stored as key/value pairs.
/// 2. ConfigurationObject - a strongly typed object that represents the configuration data known to the server.
/// To fully be able to restore the package, we need to serialize the full ConfigurationData dictionary, not
/// just the configuration properties known to the server.
/// </summary>
private string SerializeDataTypeConfiguration(IDataType dataType) =>
_configurationEditorJsonSerializer.Serialize(dataType.ConfigurationData);
}
Loading