From 1e9aa675ea0bd67eb7ee2b710e8b4b63f4058943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 19 Aug 2020 14:31:01 +0200 Subject: [PATCH] update paths when retriving the configuration --- .../blockeditormodelobject.service.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js index ead95741b4..8c7d9cd278 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/blockeditormodelobject.service.js @@ -325,6 +325,18 @@ this.propertyEditorAlias = propertyEditorAlias; this.blockConfigurations = blockConfigurations; + this.blockConfigurations.forEach(blockConfiguration => { + if (blockConfiguration.view != null && blockConfiguration.view !== "") { + blockConfiguration.view = umbRequestHelper.convertVirtualToAbsolutePath(blockConfiguration.view); + } + if (blockConfiguration.stylesheet != null && blockConfiguration.stylesheet !== "") { + blockConfiguration.stylesheet = umbRequestHelper.convertVirtualToAbsolutePath(blockConfiguration.stylesheet); + } + if (blockConfiguration.thumbnail != null && blockConfiguration.thumbnail !== "") { + blockConfiguration.thumbnail = umbRequestHelper.convertVirtualToAbsolutePath(blockConfiguration.thumbnail); + } + }); + this.scaffolds = []; this.isolatedScope = scopeOfExistance.$new(true); @@ -541,15 +553,6 @@ } blockObject.key = String.CreateGuid().replace(/-/g, ""); blockObject.config = Utilities.copy(blockConfiguration); - if (blockObject.config.view != null && blockObject.config.view !== "") { - blockObject.config.view = umbRequestHelper.convertVirtualToAbsolutePath(blockObject.config.view); - } - if (blockObject.config.stylesheet != null && blockObject.config.stylesheet !== "") { - blockObject.config.stylesheet = umbRequestHelper.convertVirtualToAbsolutePath(blockObject.config.stylesheet); - } - if (blockObject.config.thumbnail != null && blockObject.config.thumbnail !== "") { - blockObject.config.thumbnail = umbRequestHelper.convertVirtualToAbsolutePath(blockObject.config.thumbnail); - } if (blockObject.config.label && blockObject.config.label !== "") { blockObject.labelInterpolator = $interpolate(blockObject.config.label); }