fixes U4-11385 Can't create doc type folders.

using dispatch instead of dispatchcancelable when the event is not cancelable for both saving and renaming.
This commit is contained in:
Claus
2018-05-30 14:39:12 +02:00
parent 6208a3ec73
commit 9838977806
2 changed files with 4 additions and 3 deletions

View File

@@ -114,13 +114,13 @@ namespace Umbraco.Core.Services.Implement
protected void OnSavedContainer(IScope scope, SaveEventArgs<EntityContainer> args)
{
scope.Events.DispatchCancelable(SavedContainer, This, args);
scope.Events.Dispatch(SavedContainer, This, args);
}
protected void OnRenamedContainer(IScope scope, SaveEventArgs<EntityContainer> args)
{
// fixme changing the name of the event?!
scope.Events.DispatchCancelable(SavedContainer, This, args, "RenamedContainer");
scope.Events.Dispatch(SavedContainer, This, args, "RenamedContainer");
}
// fixme what is this?

View File

@@ -924,7 +924,8 @@ namespace Umbraco.Core.Services.Implement
_containerRepository.Save(container);
scope.Complete();
OnRenamedContainer(scope, new SaveEventArgs<EntityContainer>(container, evtMsgs));
var saveEventArgs = new SaveEventArgs<EntityContainer>(container, evtMsgs) {CanCancel = false};
OnRenamedContainer(scope, saveEventArgs);
return OperationResult.Attempt.Succeed(OperationResultType.Success, evtMsgs, container);
}