From 11e1fef85a0f0f81ca1792ef5031df31d027e7be Mon Sep 17 00:00:00 2001 From: Renaud Paquay Date: Fri, 30 Apr 2010 21:56:35 -0700 Subject: [PATCH] Fix bug with blog post blog post container field wasn't set properly. This is due to a change in order of events between CommonAspect and BlogPost activation. As a temporary workound, change CommonAspect to force setting container and owner record fields if they have a value when Activated event is processed. --HG-- branch : dev --- .../Core/Common/Handlers/CommonAspectHandler.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Orchard.Web/Core/Common/Handlers/CommonAspectHandler.cs b/src/Orchard.Web/Core/Common/Handlers/CommonAspectHandler.cs index a2f3d4366..99c652d12 100644 --- a/src/Orchard.Web/Core/Common/Handlers/CommonAspectHandler.cs +++ b/src/Orchard.Web/Core/Common/Handlers/CommonAspectHandler.cs @@ -129,6 +129,10 @@ namespace Orchard.Core.Common.Handlers { return user; }); + // Force call to setter if we had already set a value + if (aspect.OwnerField.Value != null) + aspect.OwnerField.Value = aspect.OwnerField.Value; + aspect.ContainerField.Setter(container => { if (container == null) { aspect.Record.Container = null; @@ -138,6 +142,10 @@ namespace Orchard.Core.Common.Handlers { } return container; }); + + // Force call to setter if we had already set a value + if (aspect.ContainerField.Value != null) + aspect.ContainerField.Value = aspect.ContainerField.Value; }