From 4697f2ecad9dff86fa866037e71cf1660dbbb32a Mon Sep 17 00:00:00 2001 From: Hai Le Date: Sat, 1 Aug 2015 15:54:00 +1000 Subject: [PATCH 1/2] Bug fix: Issue with stripping modifiers with no trailing characters after placeholder When using a modifier with no trailing characters after the placeholder eg. setting a color style with #{0}. The end selection is set to 0 resulting in the value also being stripped --- .../views/propertyeditors/grid/dialogs/config.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js index 731912c951..d60535acd1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/dialogs/config.controller.js @@ -22,7 +22,10 @@ angular.module("umbraco") } else { return val.slice(paddArray[0].length, 0); } - }else{ + } else { + if (paddArray[1].length === 0) { + return val.slice(paddArray[0].length); + } return val.slice(paddArray[0].length, -paddArray[1].length); } } From b7eb6303ec3417e69d3cbaac64c4722dc3fbc8cd Mon Sep 17 00:00:00 2001 From: Stephan Date: Tue, 8 Sep 2015 18:38:20 +0200 Subject: [PATCH 2/2] U4-7076 - fix xml cache corruption when publishing with children --- src/Umbraco.Core/Services/ContentService.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 3cc59708e9..c4cd7f61e1 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1836,14 +1836,18 @@ namespace Umbraco.Core.Services //Publish and then update the database with new status var publishedOutcome = internalStrategy.PublishWithChildrenInternal(list, userId, includeUnpublished).ToArray(); + var published = publishedOutcome + .Where(x => x.Success || x.Result.StatusType == PublishStatusType.SuccessAlreadyPublished) + // ensure proper order (for events) - cannot publish a child before its parent! + .OrderBy(x => x.Result.ContentItem.Level) + .ThenBy(x => x.Result.ContentItem.SortOrder); var uow = UowProvider.GetUnitOfWork(); using (var repository = RepositoryFactory.CreateContentRepository(uow)) { //NOTE The Publish with subpages-dialog was used more as a republish-type-thing, so we'll have to include PublishStatusType.SuccessAlreadyPublished //in the updated-list, so the Published event is triggered with the expected set of pages and the xml is updated. - foreach (var item in publishedOutcome.Where( - x => x.Success || x.Result.StatusType == PublishStatusType.SuccessAlreadyPublished)) + foreach (var item in published) { item.Result.ContentItem.WriterId = userId; repository.AddOrUpdate(item.Result.ContentItem);