From 82df91d9c15e2c94abff8ad7d5b00bc5c50eb362 Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Tue, 9 Jun 2026 10:14:54 +0100 Subject: [PATCH 1/3] revert the encoding of blocks from #955 - because that breaks rendering as per #958 --- uSync.Core/Mapping/SyncBlockMapperBase.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/uSync.Core/Mapping/SyncBlockMapperBase.cs b/uSync.Core/Mapping/SyncBlockMapperBase.cs index 267d288e..92218a53 100644 --- a/uSync.Core/Mapping/SyncBlockMapperBase.cs +++ b/uSync.Core/Mapping/SyncBlockMapperBase.cs @@ -62,18 +62,11 @@ public SyncBlockMapperBase( _logger.LogDebug("Importing block value for {PropertyEditorAlias} {valueType}", propertyType.PropertyEditorAlias, value?.GetType().Name ?? "blank"); var importString = SyncBlockMapperBase.GetStringValue(value) ?? string.Empty; - var result = await _mapperCollection.Value.GetImportValueAsync(importString, propertyType, options); - // When the original value was a non-string JSON type (array, object, number, etc.), - // convert string results back to JsonNode to preserve the correct JSON type - // and prevent double-encoding when the block value is re-serialized. - if (result is string stringResult && value.IsNonStringJsonValue()) - { - return stringResult.ConvertStringToExpandedJson() ?? result; - // return stringResult.ConvertToJsonNode() ?? result; - } - - return result; + // revert this back to the old way - we don't expand the json we get back because umbraco is very + // sensitve to what the exact format of the blocks is, and if we expand them, then calls during render + // can return null. + return await _mapperCollection.Value.GetImportValueAsync(importString, propertyType, options); } private async Task GetExportProperty(object? value, IPropertyType? propertyType, SyncSerializerOptions options) From f33dc33531a8edb1fe285788cf304e6f0154bb11 Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Tue, 9 Jun 2026 10:40:13 +0100 Subject: [PATCH 2/3] Add Null checks to health check (cause it can load without the services). --- .../HealthChecks/SyncFolderIntegrityChecks.cs | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/uSync.BackOffice/HealthChecks/SyncFolderIntegrityChecks.cs b/uSync.BackOffice/HealthChecks/SyncFolderIntegrityChecks.cs index c440942f..866e292b 100644 --- a/uSync.BackOffice/HealthChecks/SyncFolderIntegrityChecks.cs +++ b/uSync.BackOffice/HealthChecks/SyncFolderIntegrityChecks.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Threading.Tasks; using System.Xml.Linq; @@ -23,7 +24,6 @@ public class SyncFolderIntegrityChecks : HealthCheck private readonly ISyncConfigService? _configService; private readonly ISyncFileService? _fileService; - public SyncFolderIntegrityChecks() { } /// @@ -44,17 +44,8 @@ public override HealthCheckStatus ExecuteAction(HealthCheckAction action) /// public override Task> GetStatusAsync() { - if (_configService is null || _fileService is null) - { - return Task.FromResult((IEnumerable)new List - { - new HealthCheckStatus("uSync services not available") - { - Description = "The uSync services are not available, this likely means the site has no backoffice loaded.", - ResultType = StatusResultType.Info - } - }); - } + if (_configService is null || _fileService is null) + return Task.FromResult(Enumerable.Empty()); var items = new List { @@ -67,6 +58,9 @@ public override Task> GetStatusAsync() private HealthCheckStatus CheckuSyncFolder() { + if (_configService is null || _fileService is null) + return new HealthCheckStatus("Unable to check uSync folder integrity"); + var root = _fileService.GetAbsPath(_configService.GetWorkingFolder()); if (_fileService.DirectoryExists(root) is false) @@ -100,6 +94,8 @@ private HealthCheckStatus CheckuSyncFolder() private List CheckFolder(string folder) { + if (_fileService is null) return []; + var _keys = new Dictionary(); var clashes = new List(); @@ -143,6 +139,9 @@ private List CheckFolder(string folder) private HealthCheckStatus CheckConfigFolderValidity() { + if (_configService is null || _fileService is null) + return new HealthCheckStatus("Unable to check uSync folder integrity"); + var root = _fileService.GetAbsPath(_configService.GetWorkingFolder()); if (_fileService.DirectoryExists(root) is false) From 10429b7cb989fd72a4a177a3fa133b12bb96fbc6 Mon Sep 17 00:00:00 2001 From: Kevin Jump Date: Tue, 9 Jun 2026 10:40:36 +0100 Subject: [PATCH 3/3] v17.3.4 - package files. --- Directory.Packages.props | 1 + .../usync-assets/package-lock.json | 4 ++-- uSync.Backoffice.Management.Client/usync-assets/package.json | 2 +- uSync.History/history-client/package-lock.json | 4 ++-- uSync.History/history-client/package.json | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index dd3d247e..2eb384ad 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,6 +8,7 @@ + diff --git a/uSync.Backoffice.Management.Client/usync-assets/package-lock.json b/uSync.Backoffice.Management.Client/usync-assets/package-lock.json index a0c082e7..fafc88bb 100644 --- a/uSync.Backoffice.Management.Client/usync-assets/package-lock.json +++ b/uSync.Backoffice.Management.Client/usync-assets/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jumoo/usync", - "version": "17.3.3", + "version": "17.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@jumoo/usync", - "version": "17.3.3", + "version": "17.3.4", "license": "MPL-2.0", "devDependencies": { "@hey-api/openapi-ts": "^0.95.0", diff --git a/uSync.Backoffice.Management.Client/usync-assets/package.json b/uSync.Backoffice.Management.Client/usync-assets/package.json index 82b5cbd2..a09d7e7e 100644 --- a/uSync.Backoffice.Management.Client/usync-assets/package.json +++ b/uSync.Backoffice.Management.Client/usync-assets/package.json @@ -8,7 +8,7 @@ "homepage": "https://jumoo.co.uk/uSync", "license": "MPL-2.0", "type": "module", - "version": "17.3.3", + "version": "17.3.4", "main": "./dist/usync.js", "types": "./dist/index.d.ts", "module": "./dist/usync.js", diff --git a/uSync.History/history-client/package-lock.json b/uSync.History/history-client/package-lock.json index 426fb256..c0b6f51a 100644 --- a/uSync.History/history-client/package-lock.json +++ b/uSync.History/history-client/package-lock.json @@ -1,12 +1,12 @@ { "name": "usync-history-client", - "version": "17.3.3", + "version": "17.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "usync-history-client", - "version": "17.3.3", + "version": "17.3.4", "devDependencies": { "@hey-api/openapi-ts": "^0.95.0", "@jumoo/translate": "^17.2.3", diff --git a/uSync.History/history-client/package.json b/uSync.History/history-client/package.json index 9696c20e..7d491ab4 100644 --- a/uSync.History/history-client/package.json +++ b/uSync.History/history-client/package.json @@ -1,6 +1,6 @@ { "name": "usync-history-client", - "version": "17.3.3", + "version": "17.3.4", "licence": "Custom", "description": "uSync history function", "type": "module",