Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
EPiServer.CMS.UI 10.10.5
Jul 18, 2017
Jul 28, 2017
CMS UI
Closed, Fixed and tested
Steps to reproduce
1. Add following initialization module code to Alloy.
using EPiServer; using EPiServer.Core; using EPiServer.Framework; using EPiServer.Framework.Initialization; using EPiServer.ServiceLocation; namespace AlloyTemplates.Business { [InitializableModule] [ModuleDependency(typeof(EPiServer.Web.InitializationModule))] public class InitializationModule : IInitializableModule { public void Initialize(InitializationEngine context) { var contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>(); contentEvents.MovingContent += this.MovingContent; contentEvents.DeletingContentLanguage += this.DeletingContentLanguage; } public void Uninitialize(InitializationEngine context) { var contentEvents = ServiceLocator.Current.GetInstance<IContentEvents>(); contentEvents.MovingContent -= this.MovingContent; contentEvents.DeletingContentLanguage -= this.DeletingContentLanguage; } private void MovingContent(object sender, ContentEventArgs e) { if (e.TargetLink.Equals(ContentReference.WasteBasket, true) == false) { return; } e.CancelAction = true; e.CancelReason = "You're not allowed to delete this content. You need permission to this function."; } private void DeletingContentLanguage(object sender, ContentEventArgs e) { e.CancelAction = true; e.CancelReason = "You're not allowed to delete this language. You need permission to this function."; } } }
2. For any page, create a language branch.
3. Add the versions gadget.
4. Delete the new language branch.
Expected: The CancelReason should be displayed.
Actual: A general exception is displayed.