Skip to content

Commit 8cc8674

Browse files
committed
Merge branch 'v4/4.1' into v9/9.0
# Conflicts: # build/version.txt # src/Umbraco.Deploy.Contrib.Connectors/GridCellValueConnectors/DocTypeGridEditorCellValueConnector.cs # src/Umbraco.Deploy.Contrib/Properties/VersionInfo.cs # src/Umbraco.Deploy.Contrib/ValueConnectors/MultiUrlPickerValueConnector.cs
2 parents 8bd6cd8 + bb99efb commit 8cc8674

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/Umbraco.Deploy.Contrib/Properties/VersionInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// </auto-generated>
99
//------------------------------------------------------------------------------
1010

11-
[assembly: System.Reflection.AssemblyInformationalVersion("9.0.1")]
12-
[assembly: System.Reflection.AssemblyVersion("9.0.1")]
11+
[assembly: System.Reflection.AssemblyInformationalVersion("9.0.2")]
12+
[assembly: System.Reflection.AssemblyVersion("9.0.2")]
1313

1414

src/Umbraco.Deploy.Contrib/ValueConnectors/MultiUrlPickerValueConnector.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ public string ToArtifact(object value, IPropertyType propertyType, ICollection<A
100100
}
101101
else if (TryParseJTokenAttr(link, "udi", out guidUdi))
102102
{
103-
var entity = _entityService.Get(guidUdi.Guid, UdiEntityTypeHelper.ToUmbracoObjectType(guidUdi.EntityType));
104-
if (entity == null)
103+
var entityExists = _entityService.Exists(guidUdi.Guid);
104+
if (!entityExists)
105+
{
105106
continue;
107+
}
106108

107109
// Add the artifact dependency
108110
dependencies.Add(new ArtifactDependency(guidUdi, false, ArtifactDependencyMode.Exist));

src/Umbraco.Deploy.Contrib/ValueConnectors/NestedContentValueConnector.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ public string ToArtifact(object value, IPropertyType propertyType, ICollection<A
114114

115115
// pass the value, property type and the dependencies collection to the connector to get a "artifact" value
116116
var innerValue = row.PropertyValues[key];
117-
object parsedValue = propertyValueConnector.ToArtifact(innerValue, innerPropertyType, dependencies);
117+
118+
// connectors are expecting strings, not JTokens
119+
object preparedValue = innerValue is JToken
120+
? innerValue?.ToString()
121+
: innerValue;
122+
object parsedValue = propertyValueConnector.ToArtifact(preparedValue, innerPropertyType, dependencies);
118123

119124
// getting Map image value umb://media/43e7401fb3cd48ceaa421df511ec703c to (nothing) - why?!
120125
_logger.LogDebug("Mapped {Key} value '{PropertyValue}' to '{ParsedValue}' using {PropertyValueConnectorType} for {PropertyType}.", key, row.PropertyValues[key], parsedValue, propertyValueConnector.GetType(), innerPropertyType.Alias);
@@ -202,6 +207,11 @@ public object FromArtifact(string value, IPropertyType propertyType, object curr
202207
{
203208
row.PropertyValues[key] = convertedValue.ToString();
204209
}
210+
// json strings need to be converted into JTokens
211+
else if (convertedValue is string convertedStringValue && convertedStringValue.DetectIsJson())
212+
{
213+
row.PropertyValues[key] = JToken.Parse(convertedStringValue);
214+
}
205215
else
206216
{
207217
row.PropertyValues[key] = convertedValue;

0 commit comments

Comments
 (0)