From 647fbea0663a037eec8d72ecaa9893d2c557dfaa Mon Sep 17 00:00:00 2001 From: Dave Woestenborghs Date: Mon, 1 Feb 2016 11:48:32 +0100 Subject: [PATCH 1/2] Use product name in migration runner instead of Umbraco productname Fixes http://issues.umbraco.org/issue/U4-7872 --- src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs b/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs index 234cd67386..3683e24a00 100644 --- a/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs +++ b/src/Umbraco.Core/Persistence/Migrations/MigrationRunner.cs @@ -289,7 +289,7 @@ namespace Umbraco.Core.Persistence.Migrations //NOTE: We CANNOT do this as part of the transaction!!! This is because when upgrading to 7.3, we cannot // create the migrations table and then add data to it in the same transaction without issuing things like GO // commands and since we need to support all Dbs, we need to just do this after the fact. - var exists = _migrationEntryService.FindEntry(GlobalSettings.UmbracoMigrationName, _targetVersion); + var exists = _migrationEntryService.FindEntry(_productName, _targetVersion); if (exists == null) { _migrationEntryService.CreateEntry(_productName, _targetVersion); @@ -308,4 +308,4 @@ namespace Umbraco.Core.Persistence.Migrations /// public static event TypedEventHandler Migrated; } -} \ No newline at end of file +} From a763602aebea52fde4cfd073412ada140b48b20e Mon Sep 17 00:00:00 2001 From: Simon Busborg Date: Tue, 2 Feb 2016 15:38:12 +0100 Subject: [PATCH 2/2] Fixes: U4-7072 Grid TinyMce with style_formats throws "Cannot assign to read only property 'name' --- .../components/grid/grid.rte.directive.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js index d50632a43a..0692a10e90 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js @@ -111,6 +111,31 @@ angular.module("umbraco.directives") if (tinyMceConfig.customConfig) { + + //if there is some custom config, we need to see if the string value of each item might actually be json and if so, we need to + // convert it to json instead of having it as a string since this is what tinymce requires + for (var i in tinyMceConfig.customConfig) { + var val = tinyMceConfig.customConfig[i]; + if (val) { + val = val.toString().trim(); + if (val.detectIsJson()) { + try { + tinyMceConfig.customConfig[i] = JSON.parse(val); + //now we need to check if this custom config key is defined in our baseline, if it is we don't want to + //overwrite the baseline config item if it is an array, we want to concat the items in the array, otherwise + //if it's an object it will overwrite the baseline + if (angular.isArray(baseLineConfigObj[i]) && angular.isArray(tinyMceConfig.customConfig[i])) { + //concat it and below this concat'd array will overwrite the baseline in angular.extend + tinyMceConfig.customConfig[i] = baseLineConfigObj[i].concat(tinyMceConfig.customConfig[i]); + } + } + catch (e) { + //cannot parse, we'll just leave it + } + } + } + } + angular.extend(baseLineConfigObj, tinyMceConfig.customConfig); }